Brokerages give away free stock because they want to attract new users to their investment platform. It's just like how a bank may offer a cash bonus for opening a new checking account.