As a VERY frequent traveller to/from LGA (NY) and PHL, I will tell you that the airlines most CERTAINLY know when flights are delayed prior to taking off.
I have stuck in planes off the runway MANY TIMES, just to have the pilots give us the song and dance that they didn't know UNTIL they taxied off the gate! (YEAH RIGHT)!
Luckily, I am fairly young to deal with sitting for longer periods in cramp situations in planes, but I truly feel for the ones who needs their leg to move or else they get severe cramping.
The airlines never tell you that we will be sitting in the planes off the runway in fears of backlash, flight change requests, etc.- They can't be bothered!
And summertime is the WORST! (esp the holidays)!
One time I flew out of PHL the day before 4th of July, and everything
seemed smooth until we taxied out of gate and then was told that we were
51st in line to take-off!!

We were told that it would take about 2 hours before we be "reach the skies"! It took us over 2 hours before we actually did; Luckily again, it was Toronto (just over an hour flight from Philly).
However, I had another from NYC even a few years earlier than that where I was flying to LAX, and we stayed inside the plane for over 3 hours before we even took off the runway! Again, no announcements that we would be stuck inside a plane this long!
I can go on and on with the stories!
The 2 I've mentioned are my most extreme cases, but then again, I've been through while being stuck inside the plane off the runway, that my flight
might be cancelled if we don't reach LGA's curfew rule (landing by 12 midnight), etc... etc... etc...
I could go on and on... (and to a certain extent, I have)!
And let me not start getting into my LAST flight experience where I got my flight cancelled TWICE on 2 separate days (I rescheduled that flight was cancelled)... just to be left on stand-by ALL DAY!!
TRULY THE STORIES I CAN SHARE WITH YOU!
Anyhow, yes, the airlines DO KNOW all the delays, but they are literally programmed to lie and not disclose the truth about them to the consumers who pay for their "services"!