Walled gardens aren't really about piracy. It's about capturing part of the market and preventing any competition within in. Apple and Google are leveraging their marketshare in one market to gain a huge profit in another.
And it has been very successful. 30% of software, music, video, and games sales is huge. They profit more from those sales than the content creators do.