This is an extremely popular method due to the very low difficulty there is to be able to do so.
For example, one very popular method in Old School Runescape to earn some gold, is by slaying Green dragons in the wilderness. There are thousands of ways to generate yourself a source of in-game gold in Runescape 3 and Old School Runescape. This is done when you collect or buy Runescape gold and sell it to someone in exchange for real money. This of course is not a part of the game and is done through third party services.