Which varies in my experience. If there's an available window 5-10 minutes early, I've absolutely seen planes take it. And, of course, conversely delays are not infrequent. They presumably won't leave before boarding time (and don't think I've ever observed that) but I have seen boarding time be very close to door closed time. I've had connections that seemed pretty comfortable and I've ended up being pretty much the last person on the plane.