Emilie I will try to answer your questions.
It tests skill in training the horse and the ability of the rider. You train in all sports, and competition tests how effective that training is, along with various other skills. Its a particularly ancient sport, closely tied to the development and history of the human race. Horses and humans have long worked together, and that is the origin of the equestrian sports we now have.
Riding lessons are relatively cheap. I had them from age 5, and my parents were neither rich or horsy.
Some families in the equestrian world are very rich, but if you think thats not the case in other sports, you are wrong! A lot of it is dependent on family connections - 2 Scottish Olympic runners are the daughters of Olympic athletes - Eilish McColgan and Linsday Sharp. And tbh a very high proportion of British medal winners have been "hothoused", had lots of funding and specialist selection and training, which is why the UK is doing so well compared to a lot of countries.
I think the "toff" image comes more from the way that the urban UK has become divorced from anything properly rural. And what people don't understand, they tend to denigrate.
What riders do who don't come from rich horsy families (and there are many), is do what gold medallists Carl Hester, Charlotte Dujardin, Nick Skelton, Ben Maher and Peter Charles did (thats more than half of them) and go to work with horses and learn their trade. One arguement for the Brits suddenly doing so well in showjumping is that they have all spent years riding cheap, not very good horses, and when by luck, planning and coincidence they had good horses, they were able to capitalise on it.
Nick Skelton and Ben Maher for example went to work for the same showjumping yard as grooms/riders and made their way up through getting good results.