I believe the proximity sensor also automatically switches off (or dims) the screen if the phone is held up against something – for example when making a phone call…