Intensive exercise affects your body in several different ways: your heart pumps faster, your lungs undergo an increased level of ventialtion, blood moves through your veins and arteries faster (and the veins/arteries dialate), your muscles contract more rapidly and frequently, your liver produces energy, etc. Giving these different systems time to "cool down" can be important for the resilience of their future functionality, and allows them to adjust to an upcoming rest state.
Pushing for that "burn" you feel in the muscle means you're approaching your lactate threshhold, and lactic acid has been pooling in your muscles. Your body will convert lactic acid back into energy to be burned, and cooling down slowly allows your body to do just that. Stopping abruptly leaves this acid in the muscle, and creates waste products within such as CO2 and creatine kinase.
Additionally, your body releases horomones such as norepinephrine and growth horomone while you exercise intensely, and stopping abruptly can leave a high level of these horomones in the blood causing sleeplessness/restlessness.