There are a variety of physiological reasons why more blood travels to your muscles during exercise, which allows you to exercise at optimal levels. The increase is caused by a natural response in your body that shuttles blood from other areas of the body to the active tissue. The diverting of blood can be from the organs of your digestive system or from muscle tissue that is less active.
The primary responsibility of the increased blood flow is to supply the working muscles with oxygen and nutrients such as sugar and fats to create energy. Your body utilizes oxygen to help extract energy from carbohydrates and fat. When oxygen is present in enough quantities, you don't produce as much lactic acid. This prevents you from becoming fatigued quickly when working out. The sugar comes from your naturally circulating blood sugars but also from glycogen stores. Lipids from your fat tissue are also passed through the bloodstream and to your muscles for energy.
As you exercise, your body produces waste products, primarily carbon dioxide, that need to be removed so exercise can continue. Carbon dioxide is also the primary driver of breathing and circulation during exercise. Carbon dioxide is formed after oxygen has been utilized for energy production. Other waste products include lactic acid, which normally accumulates during exercise and must be shuttled away to be reused as energy. Too much lactic acid also prevents other energy-producing pathways from operating efficiently.
The increases in blood flow also allows for recovery to take place after exercise has been completed. Sugar gets shuttled back into the muscles to help restore glycogen stores for the next time you exercise. Amino acids, the building blocks of proteins, are brought into the muscle to help repair any damaged muscle tissue. You have also incurred what is termed an "oxygen deficit" during exercise. Oxygen is also taken into the muscles after exercise has finished to replenish this deficit.
The increased blood flow and continued shuttling of nutrients trains your body to work more efficiently in using the increased blood flow. Your body will increase the amount of hemoglobin in the blood to shuttle more oxygen as well. It is also important to note that too much blood flow to the muscles can cause problems. This can be a result of sustained contractions for a prolonged period of time. These isometric holds, where the muscle stays in a contracted state, dramatically increases blood flow into the muscle and greatly increases your blood pressure. This can lead to passing out, light-headedness or cause a cardiovascular event such as a heart attack.