Why should I soak beans before cooking?
One reason is to remove some of the indigestible complex sugars that cause gas.

Another reason is that beans are dirty, so you're just cleaning them with the soaking. If the recipe wants the beans to be cooked in the water used for soaking, the washing needs to be done before the soaking.

On top of that the soaking can reduce cooking time considerably, which might be the biggest advantage.