Amazon is a bookstore.
Epic sees Steam and Apple (and Amazon) and knows that the platform is the chokepoint where all the money is.
It's also an easy way to to procure licensing to sell music content in games. I'd be interested to know why they passed up others like SoundCloud.
As for SoundCloud, either they didn't come to terms for whatever reason, or they didn't try to begin with if marketing considerations favor BP.
If you have a platform that artists allow purchasing of their music through, you can extend it to allow customers to sell/license songs in their games (developer) or buy snippets of song in Fortnite (gamer).
Sound Cloud would achieve these features too, and I am certain they considered more than just Bandcamp, as well as kept everyone under NDA during the shopping around.
Fortnite and other games are really just Unreal Engine advertisement vessels that got successful in their own right and now serve that purpose plus making lots of money on their own.