The final M*A*S*H episode filmed paid off a joke they set up 255 episodes early
The very first scene has a joke that only makes sense in the last thing they shot.

Read to Me
Everyone knows the M*A*S*H finale, "Goodbye, Farewell and Amen," because seemingly everyone in America was watching it when it aired on February 28, 1983. Okay, well, it wasn't everybody, but it was about three out of four TV sets in the United States, making it the most-watched episode in television history. Still.
But for the cast and crew of M*A*S*H, "Goodbye, Farewell and Amen" was not adieu. They filmed one more episode after that, "As Time Goes By." It just so happened to air the week prior.
It was a fitting script for the actors to finish their long run. In the final scene, the 4077th puts together and buries a time capsule. It's an emotional moment, heightened by the fact that the actors hardly had to pretend — this would be the last time they all worked together on the show.

There's something even more brilliant about the time capsule scene you might have missed. Pay attention to what Margaret says. We captioned a bit of it in the top image.
"When somebody opens this up in a hundred years…" she says. Does that ring a bell?
Think back to the beginning of the series. The very, very beginning. The opening shot of the pilot episode, simply titled "Pilot." Trapper and Hawkeye golf. As Trapper tees off, text appears on the screen:
Korea, 1950 — a hundred years ago
A hundred years! Exactly when the time capsule was set to be opened.
That means, in a way, that the entire M*A*S*H series was someone uncovering the trials, tears, tricks and tribulations of the 4077th a century later. The show is something that has been dug up in the year 2050!
Did you ever wonder why they made that joke about "a hundred years ago"? Did the writers know they were going to end it with a time capsule scene 11 years later? Talk about brilliant plotting!

Watch M*A*S*H on MeTV!
One Full Hour
Weeknights at 7 PM
Sundays 7 PM
*available in most MeTV markets
60 Comments

“... “Korea, 1950. A hundred years ago.” You are taking literally something meant as satire. Larry Gelbart — who wrote the episode — said ‘I wrote the line to indicate how long ago the Korean War seemed in the minds of the American public.’ He is not stating the viewer is in 2050.”
For MASH fans, this is a good read:
"Due to the amount of time required for postproduction, the two-hour finale was shot the summer before the premiere of the shortened last season. The real last episode shot was "As Time Goes By." Hundreds of journalists and photographers from around the world waited outside stage 9 to capture the moment."
Source: https://www.hollywoodreporter.com/features/mash-oral-history-untold-stories-one-tvs-important-shows-1086322
Ummm... no. You're trying to match up two events from two different ends of the MASH timeline: The pilot which states is set in 1950 and the end of the war, in 1953. When Margaret says "...100 years from now..." that means the time capsule would be opened in 2053, not 2050.
So for this supposed "set up" of the entire show being found in a time capsule, Margaret would either have had to say, "...97 years from now...", or the caption in the pilot would have had to say "Korea - 1950, 103 years ago." Neither of which makes any sense.
This doesn't make sense. The production code for "Goodbye" is 9B04. "As Time Goes By" has a production code of 9B10*. That means five episodes were filmed between "Goodbye" and "Time." The only way what is written in the article could be true is if they continued to film "Goodbye" while filming those five episodes. And even if that's true only short scenes would have been filmed in case a scene had to be re-filmed. In any case, I've never heard that happened. You can't say "As Time Goes By" was filmed right after "Goodbye."
*Note: Only ten episodes including the finale were filmed that season. The rest were holdovers from the previous season.
But this post is a stretch. The Pilot episode of M*A*S*H was written by Larry Gelbart who co-created the series with Gene Reynolds but Gelbart left M*A*S*H after the 5th season. "As Time Goes By" was written by Thad Mumford and Dan Wilcox who joined the M*A*S*H writing staff at the beginning of Season 8.
Larry Gelbart was a brilliant writer and I seriously doubt that when he left, he left behind instructions for a joke about the Korean War being 100 years ago to be used in some episode in the future to written by writers who aren't on staff yet.
Now (by Network standards) MASH would never be allowed if it straight-up (was perceived) to make any political statement. In those decades, Networks kept a tight rein on the broadcast of “political opinions.” (Look at what happened to the Smothers Brothers). By making the series an ultimate flashback, simply added more distance, for the purpose of suggesting an objective reflection. And to escape from making a concrete statement about more contemporary issues of the day. In other words, the MASH production was suggesting a “period piece” by using the statement “Korea, a hundred years ago.”
Perhaps not so effectively however, because of under-calculating how astute viewer/fans really are and were. But the only thing the MASH team really cared about was getting that show on the air!