Companies are willing to pay loads for getting their stuff out in the market and bringing in new customers.
So if you can bring them customers, they will pay you a sort of commission.
Anyone can do this, even new artists who are just starting out.
The technical term for this type of endorsement is called Affiliate Marketing
It works a little different from advertisements where celebrities appear and tell you that you should buy such and such stuff.
You just promote their products and provide a channel for customers to reach them.