Trucks are known for being incredibly reliable and fitting almost every niche all at once. Need to haul 5 people? You can have a pickup or a sedan. Need to haul lumber? You can have a pickup or a van. Need to drive down a 2 track road once or twice? You can have a pickup or an SUV. Need to move a refrigerator? You can have a pickup... well really just a pickup. Need to haul a trailer? You need a pickup. Need to park downtown? We invented rear-view cameras for that, no need for a subcompact anymore. Need good gas milage? Why? Gas is cheap.
They last forever, are known for being inexpensive to maintain, and in the rare occasion you actually need a pickup, now you don't have to rent one. There's no situation where you need a sedan but a four-door pickup won't also work. So they hold their value very well.