I also heard vet school is pretty expensive.
Yes, it can: expense of getting into the field limits competition.
Now, long-term steady-state eventually the market should adjust so that the people are willing to pay the up front cost because of the actual rewards, but real meaningful effects are often not long-run steady-state effects.
Veterinary school is harder to get into and their is a lot of overlap in background materials. Med school has a lot of overlap so if somone desideds to swap carriers it’s an easy transition into a high paying job.