Welcome to economics!
It’s supply v. demand, pure and simple. There is not a lot of supply for manuals, but even less demand.
As for which will last longer, I think its a bit of a wash. Most automatics nowadays will likely outlive the car body itself, so I think their longevity issues are massively over-hyped. Not that long ago, it was a significant issue, but now? Not so much, IMO. Manual transmissions will tend to last longer, sure - but if the body wears out at the same rate, does it matter? The bigger question with manuals isn’t the transmission itself, but the clutch. If you don’t drive the car properly, the clutch will likely wear out well before an automatic transmission would. And on some cars, replacing the clutch is a bear and a half. Some coworkers have spent upwards of $1200-1500 replacing their clutches recently.
Of course, the line between the two is getting blurred rapidly. Now you have some automatics that are really nothing but computer controlled manual transmissions. In fact, if you bought a new Ford Focus with an automatic transmission, that is what you would get - a dual clutch automatic, where you essentially have two manual transmissions, one with 1st, 3rd, 5th, and reverse gears and the other with 2nd, 4th, and 6th. They’re hardly any different than a manual in function, except they’re automatically controlled. And thanks to that control, the clutches should last much longer than you would get from an average driver in a classic manual transmission vehicle.