The big reason it happens "prior" to departure is because we can't depart if there is any reason we might exceed duty limitations. Diversions included. The 16 hour duty limit is a hard limit. You're not supposed to exceed it. Period.
Typically if the delays are getting long enough and our duty is getting close to that 16 hours (or less depending on rest) it's not unusual for us to get reassigned or have a reserve pilot take over to prevent delays or stranding passengers. It does happen sometimes though. Last summer I timed out when we diverted to LIT
on a COS
leg due to thunderstorms. We did our best to hold as long as safely possible knowing full well that the second our wheels touched in LIT
I was done. Because of the WX
and the time of day they were unable to get another FO to the aircraft and as a result about 65 passengers spend the night in the Arkansas capital on Delta's dime.