When you hyperventilate from anxiety

When you hyperventilate from anxiety, why is it recommended that you breathe into a paper bag? Explain the physiology behind that.
Normally when a person is hyperventilating it is usually due to the bodies response to high CO2 concentration basically means fast and rapid breathing. Some of the causes are anxiety, fear, or stress but also drugs overdose or lung disease. Normally breathing when we breathing in we inhale O2 and when we breathe out CO2.
We also need to know how to treat it. If hyperventilating causes a reduction in carbon dioxide, we must somehow increase our carbon dioxide levels so that homeostasis can be restored. If carbon dioxide is released when you exhale, then why not breathe back in the carbon dioxide that you just exhaled, your levels will increase. By breathing in to a paper bag, the air you just exhaled (which is full of carbon dioxide) cannot escape and you can breathe it back in, thus brining your carbon dioxide levels back to a normal balance.
Some do not agree with the paper bag method because just like you can lose too much carbon dioxide and throw off your body’s balance, you can also inhale too much carbon dioxide. Some ways to prevent hyperventilation can be medication for anxiety, learning how to calm yourself down before you lose control of your breathing, and finding a way to reduce your stress levels.