I asked around and a dude told me it is to avoid moisture in the air. Is this true?
In some procedures that's the reason for using an inert gas, but just as often the reason is that either the reactants or the product is highly sensitive towards oxidation, and will even react with the oxygen in the air. Examples of such reactions are those involving phenols in basic solution, many organometallic reactions as well as the delicate operations involved in LSD synthesis.
Whether a drying tube is enough, or if the inert gas is indispensible, it simply varies between different reaction types.