How does rubbing soap on wet skin produce foam, and does it really enhance cleaning?

The soap bubbles are a side-effect of the cleaning process. It is the mixing of air with the soapy water, and the film stability of the resulting bubble walls, that generates and maintains the bubbles. (Note that soap bubble liquid contains glycerine, which is a powerful film stabilizer that makes the bubbles last as long as possible).

Note also that it is possible to design molecules called surfactants that behave like soap but do not create a foam of bubbles when agitated (these are used in dishwashing detergent mixtures) and furthermore that it is also possible to design molecules which when added to foamy soaps inhibit the creation of bubbles. These are called defoaming agents and are added to soap or detergent solutions which have to be pumped mechanically through filters and pipes, so the pump impeller does not spin out of control and lose prime when it ingests a slug of foam. Defoaming agents are commonly used in things like rug shampooing machines and self-powered floor scrubbers.

It is also possible to design detergents which foam up very strongly and persistently when mixed with air, by adding chemicals called film formers to them, as in the glycerine example above. Such detergents are used when processing things like crushed mineral ores, where the foam phase is used to carry off specific constituents of the crushed ore.

I think #1 was answered very well by so to answer #2:

Is there any plausible reason why a soap with foam can do better cleaning than the same soap without any foam?

Time spent rubbing hands.

Foam/bubbles are fun. If it takes time to produce foam then it increases the amount of time a person takes rubbing their hands together. I've used soap before which does not produce foam and it's much less satisfying to use as there is no indication that I've rubbed long enough nor rinsed long enough to get the soap off.

Additionally, my toddlers absolutely love rubbing their hands together with foamy soap. As long as I turn off the water then they will gladly keep rubbing instead of prematurely rinsing their hands.

Molecules of soap are composed by one hydrophobic and one hydrophile end. They clean because the hydrophobic end sticks to dirt stuff that is normally greasy, while the hydrophile end allows the product (soap + dirt) be washed up with water.

When a thin layer of water has 2 layers of soap molecules, (one at each side), it is possible for all the hydrophile ends be in contact with water, and the hydrophobic end be as far as possible of it.

When we rub, or agitate a solution of soap, we facilitate that configuration by adding air into the solution.

The spherical form minimizes the surface energy. That is the same reason for the growth of the bubbles with time.

About the cleaning efficiency, what can be said is that bubbles are an indication of the presence of soap molecules. And soap cleans.