Larry Linville left the show because he felt that the character of Frank Burns was too one-dimensional, and that they'd done all they could do with it.
Maj. Winchester first arrived in camp much the same way he leaves at the series' conclusion, in an uncharacteristically pedestrian mode of transportation for someone of his snobby and ultra-sophisticated upbringing. He arrives on the back of a filthy oxcart driven by Korean nationals, and leaves in a garbage truck.
The final scene with the snake was written specifically to differentiate Maj. Winchester from Frank Burns. In essence, it showed that Charles was not another clueless nitwit who would easily be strung along from one embarrassment to the next, but rather a worthy foe - an equal, and in some ways even superior - to Hawkeye and B.J.
Although Larry Linville left the show and is not physically in this two-part episode, in the newest remastered prints, it is the only time both his name and that of his replacement, David Ogden Stiers, appear together in the opening credits. Both actors would later meet at the closing of the last MASH unit in South Korea in 1997.
Frank's departure in the series is very similar to his departure in the original movie version. In that version, Frank (played by Robert Duvall) goes crazy and attacks Hawkeye after Hawkeye and Trapper bugged one of his and Hot Lips' lovemaking sessions and due to his irrational behavior he is sent away for psychiatric observation.