With socks on the plane
Those who want to be comfortable and walk through the plane in socks or barefoot risk coming into contact with the germs on the floor. After everyone has entered the plane with street shoes, leaving dirt and germs on the carpeted floors, there is a great risk that they will get on the socks or even directly on the soles of the feet. Packed back into the shoe when disembarking, the germs remain in a moist and warm environment and can cause inflammation or fungal diseases.
Basically, the airplanes are maintained by the airlines, but the standing time on the ground is certainly not enough for a really thorough cleaning. It is therefore not advisable to move around the aircraft without shoes.
Another reason is that it is narrow on the plane, the rows of seats close together, but such a seat must remain in its anchorage in the event of a hard landing, even with a heavy passenger, so the seats are anchored to the floor with strong struts. Bumping into the narrow aisle when walking fast without footwear can hurt badly. Another reason not to wear shoes on the plane.
What can be recommended is to loosen the shoes at the seat or to take them off completely for a short time. Here you can possibly put something underneath and thus minimize the risk of infection with germs. In general, however, it is advisable to wear comfortable and light footwear during a flight. In general, it makes sense to wear comfortable travel clothing. This will allow you to walk the longer distances at the airport with ease, avoid pressure points or even poor circulation while sitting and you will not be tempted to walk around the plane without shoes.