Because that is NOT the role of the diode. You are thinking of a protection diode across a relay or solenoid coil. A switching regulator is something completely different.
When the switch is opened, the left side of the inductor tries to go very negative. When the voltage gets to one diode drop below ground, it is caught at by the diode when it starts to conduct. This holds the left side of the inductor firmly just below ground. The inductor's magnetic field still is collapsing, so since the left side can not go more negative, the right side goes positive, discharging the inductor into the capacitor.
In a block diagram of a buck converter, the input to the inductor is connected to two switches, one to the DC input (the upper switch) and one to GND (the lower switch). Whenever one switch is on the other is off. In practice, the upper switch always is an active device like a bipolar transistor or MOSFET. For low cost, the lower switch can be a diode. It needs no control circuitry because the actions of the upper switch and the inductor automatically bias the diode into on and off states at the correct times. For greater efficiency, the lower diode is replaced with another transistor that does required a properly times control signal. This is called a synchronous buck converter.
ak