The D5100 is a wonderful camera. It knows you have a f1.8 lens mounted. But it doesn't know what you want to do with it when you're in Auto mode. So it makes a choice to try and give you a photo that's in focus and has the proper exposure. So it chooses a lens aperture that gives good depth of field and even pops open the flash if it thinks the light won't give you a shake free photo. It doesn't know you might want to use f1.8 to isolate the subject. This is what the A mode is for. If you want total control of the camera you don't want to use the green AUTO mode.