GM has an Affiliate program found under "MY ACCOUNT" on the menu. That is were you find your "affiliate code" or promo code.
When someone users your code to buy hash power, they get a 3% discount and you get an affiliate reward depending on your referrals which starts at 2.5% of the hash power they purchased.
That is why people share their codes. The buyer saves 3% and the person's code earns them rewards too.
Have a great week!
Steem on,
Mike