I have always drained and tossed the water from canned beans. My understanding has been that the water that canned beans are soaked and cooked in contains raffinose, the gas-causing sugars that humans can't digest. This University of Michigan page, referred to in the answer to an earlier question, says:
Rinse beans thoroughly and never cook beans in the water they've soaked in. It's loaded with the gas-causing raffinose sugars.
And also advises:
Drain and rinse canned beans. That will get rid of some of the gas-causing raffinose sugars (and almost half of the unwanted sodium).
Now that aquafaba is all the rage, though, I'm wondering whether my understanding is wrong. I understand that the bean water would taste mildly sweet and foam up so readily because of the raffinose. But it seems to me that aquafaba would lead to severe bloating and intestinal distress, as it relies for its properties wholly on the gassy and sugary nature of the bean water.
Am I mistaken in my understanding of the need to toss the water that one soaks or cooks beans in? Or is it just that fans consider the bloating and gas a price well paid for the delights of aquafaba?