This happens because there's only so much blood to go around in the body. When skeletal muscles are at rest, the capillary bed that supplies the muscle tissue is relatively inactive, with only 20-25% of the capillaries open. When the muscle becomes physically active, additionally capillaries begin to open, and eventually 100% of the muscle capillaries are open. This means that during exercise a much larger percentage (as much as 50% of the total volume) of blood is shunted to the muscles than is the case at rest. Blood flow to the brain has to be maintained in order to remain conscious, but blood flow to the other visceral organs, including the kidneys, can be temporarily reduced in order to shunt toward the muscles.