That is pretty much literally true. When I worked on a student newspaper, it was pretty common for the advertising manager to rush in to the editorial offices and say things like "I've just sold another full-page ad, so we're going to be printing extra pages - do you have any copy to fill them?"
Perhaps at a student paper, though that's considered a pretty huge ethical breach. I can attest that the New York Times definitely does not do that; they take this separation very seriously. Even at their headquarters, as of relatively recently, business and editorial enter through separate elevators, as they are on opposite sides of the building.
There definitely are publications without such strong and heavily enforced senses of editorial ethics, but the New York Times is not one of them.
The papers I've worked on usually had a little flexibility in terms of extra copy or advertising to populate pages as required.
Well, that by definition would be considered an ethical violation at a paper like the Times. Not at a student paper, no, but at the New York Times, definitely.
I'm curious about what you think the ethical breach here is. Advertising and editorial departments have to coordinate on practical matters like page layout.
What possible ethical issue is there?
Have you never seen the print edition of the NYT (or any other newspaper)? Since they just use news to fill in the otherwise blank areas between ads the motto really should be all the news that fits, we print.