Tenured professors do sometimes take leaves of absence to work for a period with some company on a problem they think is interesting. And many do consulting on the side.
Tenured professor at an elite school certainly isn't a bad gig. But compensation isn't mostly at the senior engineer FAANG levels that people like to throw around. But then LOTS of jobs that people both enjoy and are useful to society aren't.
While I have a lot of critics for Academia in particular regarding code publication or reproducibility or the chase for the next conference paper, this is completely uncalled for.
Their real world constraint is publish or perish, and they do have a timeline: the next conference. And their requirements does not include usability and maintenance.
Also writing a good paper is a long endeavor, often frustrating, sometimes with politics involved.
Yeah but all of that actual work is typically done by grad students and then professors just put their name on the top of it. (Even the grant proposals are often written by grad students.)