There are some ways it can work out if a drive is/about to fail:
Drive not listed or missing
Not being able to read/write to the drive at all
High Reallocated Sectors
^these are the main ones
Some controllers may be limited in how it can detect a failing drive plus out of date software/drivers and firmware as well as not running a Volume Verification and Repair from time to time.