Most college sports are just students who happen to also compete in a sport that is most likely earning negative revenue and they get scholarships in return. The NCAA and other associations, along with the school's athletic department itself, all get non-profit status and are eligible for tax-free donations and government funding because promoting amateurism in sport is a specifically designated carveout in the tax code.

Men's football and basketball are entirely different stories. Of the North American big four, hockey and baseball have always had robust minor leagues and kids are drafted into them straight out of high school. Football and basketball, on the other hand, have pro leagues that have historically relied upon university competition to develop athletes ready for the big leagues. The NBA (American pro basketball) started up a developmental league something like maybe a decade back or so it now calls the G League, but historical inertia being what it is, there is a much larger following for universities and the best players will still tend to do at least a year there, which I think is still the minimum required. The NFL (American pro football) won't draft you until you're at least three years past high school graduation, so the players there have no choice and need to go to college.

There's a lot driving it. Alumni pride, even regional and civic pride in places without pro teams in the same sport. Often the best school in each state is the flagship land grant public school and maybe a large private school, and these are usually not located in major metro areas that also have pro teams. There are a few exceptions like University of Washington, which played in the national championship game two days ago, is in Seattle. USC has one of the historically dominant teams and is in Los Angeles. But looking at the other top schools from this year, you're looking at Athens, GA, Ann Arbor, MI, Tuscaloosa, AL, Austin, TX, all places that do not have pro teams.

Something people miss is the university athletic department is often, even usually, its own separate non-profit corporation from the school. So, contrary to a lot of takes, it actually has its own revenue stream and its own expenses separate from the larger university. Having a very good football and/or basketball team can draw in enough revenue that the athletic department at the very best schools is typically self-funding. They may as well just be pro franchises, except they don't pay taxes and the athletes nominally have to attend enough classes to not flunk out, though they also don't need to graduate.

It's a farce of a system at the very top, but most athletes at most schools are actually amateurs just looking to do something healthy and competitive while they learn and get some of their school paid for, and the US law requires an equal number of scholarships awarded to men and women, so thanks to there often being men's sports that generate a lot of revenue, and there not being such a thing right now as women's football, the presence of a very successful football program can fund a ton of scholarship for obscure women's sports that give girls a chance to get a free education if they're willing to learn and practice them. Everything from fencing to bowling.