IMO outside of emergency situations, ending a session in the middle of a combat is a failure of timing by the DM. The difficulty of avoiding it, however, is heavily dependent on how flexible the end time is. Most games I've played have had very flexible end times, giving the DM a lot of leeway to pick a good stopping point. If a game revolves around real life events, such as babysitting, then this can make it much harder to time right. Fortunately my current group has a 4-5 hour session window, giving the DM plenty of time.