Well you have all missed the point. The function of a piston with it',s rings inside any contraption a bicycle pump is to act as a moveable seal inside a chamber.
It is only because it's a moveable seal that it can draw air or an air/fuel mixture into the chamber by virtue of the creation of a vacuum, compress the gases, then be driven down by combustion, then expel burned gases. The forces obliged to induct, compress and expel the gases are achieved by either other pistons or a flywheel.
It is only then able to rotate a crank by virtue of rods and consequently transmit forces towards propulsion.

