Had a phone with a bad proximity sensor a few years back, the screen wouldn't turn off, and it didn't take me long to figure out just why there's a sensor to turn off the screen, as suddenly the side of my face started getting uncomfortably warm.
It also conserves power to help extend battery life, and from glaring during nighttime use, something some folks don't like.