United has a program called ConnectionSaver to hold planes for connecting passengers where it won’t cause system or other passenger delays. United expects 25% of flights to arrive 10 minutes early (or more) every day. So holding plenty of flights still allows for on time arrivals.
American doesn’t defer to a computer for this. Their operations center can make the decision to hold a flight, for instance when there are a large number of connecting passengers they’ll have difficulty accommodating in the event of a misconnect. However there are 3 cases where gate agents are allowed allowed to hold the boarding door for customers past 10 minutes to departure.