In an online lecture, an MIT professor explained the second law of thermodynamics. One of his examples is a container filled with gas next to another filled with a vacuum. If the wall is removed, the gas will rush to fill the newly available volume. However, it is only a simple model that does not attempt to explain everything about the system.
Flat-Earthers abuse the lecture to “prove” it is “impossible” for the atmosphere to exist next to a vacuum. It becomes a flat Earth talking point as if the lecture shows us that spherical Earth “violates” the second law of thermodynamics. In reality, the gas inside the container is also affected by gravity and will also have a pressure gradient, just like the gas outside. But it is not within the scope of the lecture.
And if we ask the lecturer if Earth is flat, he will surely say no.
No matter how high the pressure is within the container, the upper position in the container will have less pressure than the lower position, even if there is no barrier between them. And if we make the container taller, the pressure at the topmost part of the chamber will approach a vacuum.
The “pressure of gas” usually refers to the nominal, average pressure inside the container. It does not imply the pressure is perfectly uniform everywhere in the container.
The inside of a passenger jet airliner is pressurized. At the cruising altitude, the interior has a higher pressure than the outside. However, the pressurized air inside the plane is still affected by gravity and will have a pressure gradient. If they allow us to bring a helium balloon inside, it will float just like outside the plane. And by using a barometer or a smartphone with a pressure sensor, we will also be able to measure the change in pressure inside the aircraft.
Pressure gradient is not a topic usually explained in a lecture about elementary thermodynamics. Students will learn it in fluid mechanics. Just because a lecturer describing the second law of thermodynamics did not mention pressure gradient, it does not mean the pressure gradient does not exist. And it does not mean the spherical Earth somehow “violates” the second law of thermodynamics.