The lucky ones will have everything paid for by sponsors. Obtaining sponsorship is a massive task.
Some teams are lucky, others never are.
There are also a lot of people chasing little money. Few outdoor equipment manufacturers are able to support race teams. Those that do often put their team together from established racers. With all sponsorship applications, it helps if you have a good track record, are racing for a noteworthy cause, or even if you just know people in the company. Remember, it just takes one person in a company to say no, and all your hard work is for nothing.