Well the obvious answer to that question is so that the airplane doesn't leave late. But who cares when the airplane actually leaves the gate? Or takes off?
As far as a passenger is concerned, the only time that matters is the time the jetway door closes. Why, in the interest of customer service doesn't the airline publish that time? And why do all the airlines seem to use a random number generator to decide how far in advance of the "departure" time that the jetway door closes. Sometimes it's five minutes, sometimes ten, sometimes earlier if you're not checked in at the airport.
(And don't get me started on the agents who seem to relish slamming the door on you. It's like some kind of weird fetish.)
Well, there actually is someone who is watching for when the aircraft actually leaves the gate. The US Department of Transportation keeps and publishes statistics on individual flight departure times. Any flight which leaves (or arrives) more than 15 minutes past the scheduled time published in the computer reservation system is considered "delayed", but all late departures no matter how small are tallied and available for comparison.
Departure and arrival times are logged automatically by sensors on the aircraft. It's not specifically when the door closes, but rather when the pilot releases the parking brake with all the doors closed. And there are quite a few things that have to happen before the brakes can be released.
In the back of the aircraft, the flight attendants have to make sure that all passengers are in their seats. Even though every passenger travelling through major airports like Denver, Dulles, Vegas and Sacramento travel on fast moving trains while standing, the FAA considers it dangerous to have passengers standing on an airplane during pushback. Go figure. Southwest even fought (and lost) a lawsuit against this restriction years ago.
The boarding agent is not even permitted to close the aircraft door until everyone is seated and all luggage is properly stowed. Only when that happens can the front door be legally closed.
When the back end of the aircraft is all set, the lead flight attendant will notify the pilots and close the cockpit door. Since 9/11 it is illegal to start the engines unless the cockpit door is closed and locked.
Up front the pilots are rather busy at this time as well. All airlines have slightly different procedures but are doing roughly the same things. Last minute checklists and takeoff data need to be taken care of and contact needs to be made with the ground crew who operate the pushback tug. The ground crew is also busy making sure all the cargo doors and other hatches are closed which are also verified by lights in the cockpit.
When all of that is done, radio contact needs to be made with ground control for pushback clearance. If there's an aircraft taxiing behind your parking spot or some other delay, you may need to sit at the gate waiting for a while for clearance.
The way most airlines pay their pilots is by flight hours. And flight hours are defined as the time between brake release at the origination and shutdown at the destination gate. So the captain, to an extent, gets to start the payclock by releasing brakes as soon as possible.
Now there are some other details such as minimum pay rigs (rules) which mean a few minutes of released brakes hardly make a difference in pay. But if the gate agent asks me if I'd mind pushing off knowing I'm ground delayed, but she needs the gate for an inbound flight, I'm properly incentivized to agree. And everyone hates waiting for a gate after landing so I like to help them out as well.
But remember that releasing the brake is a necessary but not sufficient element of an early departure. If I release the brake but the door is still open, the clock doesn't start. (The airplane won't roll because it's connected to the tug by now). Of course, once the door is closed, no one else is coming aboard so I don't have the ability to wait for anyone. All I get to do is delay brake release for a few minutes if the agent is being a horse's rear end thereby giving him a delay just to pimp him. (No, not really. That would be unethical).
No the real reason the airlines like to leave early is the hypercompetitive nature of the airline business as expressed through product differentiation. And blame the internet too.
Airlines, like cellular carriers are in a unique position of having to sell nearly the exact same product as their competitors. All airlines fly to the same government run airports, through government controlled airspace and all their customers go through the same government run grope masquerading as security theater.
All commercial airliners are now built by one of only two global aircraft manufacturers whose products are difficult to tell apart except by airplane geeks. The weather and air traffic delays are generally the same no matter which airline you fly.
So like laundry detergent or cell service, airlines need to emphasize the differences in their products, of which there are precious few. While pricing can be a major selling point, increasing fuel costs act a great leveler. As the price of fuel eats an ever larger piece of the cost pie, individual efficiencies which competent airline managements bring to the table are diminished in the overall cost picture.
While the high costs of the remaining big three legacy carriers, United, American, and Delta were shed through the cycle of bankruptcies in the post 9/11 years, the costs of the low cost airlines have increased to where there's not a great deal of cost advantage for anyone. Spirit Airlines, as an outlier, has managed to keep its costs low, but the service is so spartan that it's not clear whether their model will scale.
Airlines have even tried to be clever by charging separately for bag fees and also by breaking out the government taxes and fees but the DOT has required that those taxes and security fees be added into the total price shown on their reservation sites.
Back to the DOT
Other metrics used to differentiate airline service are the statistics kept by the DOT. Those are customer complaints, lost bags, and ontime performance. Think of those as RBIs or error stats for a baseball player. They make or break you.
Southwest distinguished itself last year, and not in a good way, by rearranging their schedule to make better use of their airplanes. It didn't work and their ontime performance plunged to dead last in the industry lineup. Highly embarrassing to their marketing strategy of a being a no-frills yet dependable airline. They have since made amends.
It is the wide dissemination of airline performance statistics through the internet which has gotten airline managements focused like a laser on early departures. In the pre-internet days, only true travel geeks would hunt down these stats. Now everyone sees them with a mouse click. Gate and boarding agents themselves have been threatened with sanctions or even termination for having too many late departures to their credit.
And as Vinnie, the gangster from Risky Business famously said, you never f--k wit a man's livelihood!
So could there be a solution to all this? Maybe, but it would require a universally adopted new standard of when "departure" actually happens. I totally get that even if the DOT and airlines were disposed to change this system why they'd be reluctant. The devil is always in the details and should the system be changed, there is little doubt that some clever MBAs up in the executive suite would be figuring out clever ways to game the system to their advantage.
So in the meantime, get to the gate early. Or drive.