At large D1 universities, the athletic department is usually set up as a quasi-independent entity. They are part of the university and are considered university employees, but their finances and fundraising are largely separate. When a coach is hired by the athletic director, they have to be formally approved by the university president and board or directors (or whatever the specific titles are). The coaches are almost never professors of any kind (though other athletic department employees sometimes teach) and are governed solely by their contracts. When a coach is fired, there is usually a buyout clause in their contract. This can be clawed back if there is evidence of a crime or wrongdoing.
This setup is why coaching salaries tend to be so high, in some cases the highest of all university employees. People often get upset about this because they think the salaries are taking away from the academic mission, but this usually isn't the case because those funds tend to be drawn from the athletic department's own pool of money. For less profitable athletic departments, the university will sometimes subsidize the department, but the more profitable departments often return money to the university. A better argument would be whether donors should donate more to academics than to sports, but it's their money, so...
The dynamics are much different for smaller schools with smaller donor and alumni bases. These athletic departments are almost never profitable. Coaches as professors are still rare in those situations though.