Top players usually get conditions, i.e. their travel expenses and hotel are covered by the organizers. Of course, some are supported by their universities, local chess authorities, the federation or private sponsors. At some events conditions aren't available, and the person has to make a quick calculation (whether he/she will be able to earn some money at all).
Also, no one gets "hundreds of thousands" to play at tournaments. Such money is available only at world championship matches.
A chess player like Kasparov probably gets paid hundreds of thousands of dollars to play at tournaments, but if you are barely the top player in your state/country, who pays for your plane tickets and hotel rooms? Do such chess players normally cover their tournament related expenses with money out of their own pockets? Do companies normally come forward and offer to pay for their expenses as long as they wear during the tournament a shirt with the logo of the company? Does FIDE subsidize their tournament-related expenses?