As pressure builds up in the combustion chamber from the oxidation process, it is perpendicular to the the piston head.
Due to design, the piston is at an angle with its connecting rod. This angle forces the piston into the side of cylinder from the pressure build-up.
Pistons have a notch/symbol showing the assembler the forward direction as a reference. The piston wrist pin in not in the middle of the piston, it is off to the thrust side to aid in 'balancing' the force upon the piston in the bore.
Too much piston-to-cylinder wall clearance and/or a cold engine, and piston slap will be heard, until the engine warms up or it eventually destroys itself.