It works perfectly fine for me, even with sweaty fingers. Either some people have a faulty sensor or there is something about their fingers making sensor go crazy.
Actually, if you Google "iphone fingerprint sensor sweat" you'll find that a lot of people have this problem.
Sweat and water are known interference factors with RF sensors like this one.
Normally a signal goes through the finger and out through the underlying fingerprint ridges into the sensor.
With moisture, the signal can get short-circuited across the face of the sensor instead, masking the fingerprint ridge info behind it.