I honestly don't see how the cosmetics in GW2 can be bringing in that much money.
Whales. 9 out of 10 players might not buy anything, but Anet needs only the 10% of diehards who spend hundreds on the cash shop. As aforementioned, all of the good looking skins come from the cash shop. Each item costs at least 500 gems ($6.25, but usually more. Many items are only available as a part of $20 combo packs) and there are 7 armor slots, not to mention weapons. Legendary weapons can be ostensibly earned or crafted for "free" but require expensive mats and for you to have a high crafting proficiency (which has to be levelled with a lot of expensive mats). It makes no sense to farm for gold ingame. Flipping burgers at McDonalds, etc - is orders of magnitude more efficient than farming Drizzlewood cost for dozens and dozens of hours. So to get a legendary you're looking at paying $50+ be it to craft it yourself or to buy a complete one off of the auction house.
You can only get mount skins from the cash shop. Also, if you play a big character like a Charr, then the default free mount skin looks comically small for your character. If you don't want to look dumb then you have to buy the Dreadnought Raptor skin and the Broadhorned Bull skyscale skin. A mount skin costs $20 so that's $40 right there.
Also, FOMO. Almost all of the cosmetics in GW2 are only available for a 7 day duration before being unavailable for several months. If someone sees something they somewhat like, they are pressured to buy it because then they won't have a chance to get it again for a while. Also, the limited time sales leads people to
bookmarking the sales thread on the forum, checking it every day, which makes thinking about the game part of their daily routine. It's the same psychology behind daily login rewards in F2P games.
Also, there are utilities. For example, bag space is character specific, and in this game your bags fill up with loot at an incredible pace, and having less than 300 bag slots is a real chore. One bag slot costs 400 gems ($5), and as of right now you can buy up to 7 more bag spaces so that's $35 just to max out bag slots for one character, not counting the cost of the actual bags themselves, and the devs raise the number of max bag slots you can buy every now and then (it used to be 10 max a few months ago). If you play more than one character then that is a lot of money you have to spend just for that one utility.