Replacing a dryer that has a three prong hook up
What you have is 2 hots and a ground being misused as a neutral.  This is dangerous and illegal.  It would also be dangerous and illegal to misuse a neutral as a ground, except that a special exception was made in the Code to make it legal here. 

Usually when you see these obsolete/dangerous NEMA 10 receptacles, they are this way because obsolete wire was used, and wire is hard to replace.  However, if you look closely, it is modern wire with both neutral and ground.  Clearly, the house originally had the modern, safe NEMA 14 type receptacle, and somebody got a used dryer with an obsolete NEMA 10 cord, and fit the NEMA 10 receptacle instead of a NEMA 14 cord. 

When the NEMA 10 fails, it fails deadly, electrifying the chassis of the machine. It has a track record of killing people, although some deny this - the problem is, these accidents are typically miscategorized as miswired outlets (botched wiring) when in fact the wiring was correct and simply failed. 

For safety, I would put it back to the modern, safe NEMA 14-30 receptacle and cord.  Either pull some slack from that 4-wire cable, or lower the receptacle 2 inches so you can get use of that neutral wire.  

When you fit the NEMA 14 cord, remember to remove the ground-neutral link on the dryer.  Neutral should go to power terminals, ground should go to chassis, and they shouldn't be linked.