The pay might be high but the average career is much shorter than that of a programmer. I bet the lifetime earnings aren't even that much different than the average person checking HN from California.
While major leaguers’ salaries have increased by more than 2,000 percent since 1976,” the lawsuit says, “minor leaguers’ salaries have, on average, increased only 75 percent since that time.”
That leaves minor league salaries typically ranging from $1,100 a month in short-season leagues to $2,150 a month for Triple-A, figures asserted in the lawsuit and confirmed by two major league front-office officials.
But in baseball, almost every player has to play in the minors first. The majority of minor leaguers don't make it to the majors... but it isn't usually possible to tell which type of minor leaguer you'll be for a few years.
So in pursuing professional baseball, you really do open yourself to a significant risk of finding that you're 26 and spent the last five years making very little money and now you don't have a job, or any professional skills beyond the offseason job you may have worked.