Well it is simple, first of all let us look at a sub problem. Let's ask what would be the shape of the surface of the fluid in case of a uniform angular rotation. I am, for simplicity, assuming that the fluid has no turbulence and it is uniformly dense.
Every classical physics problem can be analysed using free body diagrams, and if you draw one for these, you will find that there are two forces acting on a mass element, one the centrifugal force on it (I have done the analysis from the frame of the axis) and other gravity. Now we use the following property of liquids: they can't withstand shear force, i.e. they will distribute in such a way that the net force on the fluid is perpendicular to the fluid surface.
Now we are ready to deal with the problem. If you analyse the free body diagram, you will find that
$$\frac{dy}{dr}=\omega^2r$$
If you solve this differential equation you will get the following result
$$y=\frac{\omega^2r^2}{2}$$
Which basically means that the fluid surface is like a parabola (technically it's a paraboloid)
Now I am going to assume one more thing: that the density of the foam is much less compared to that of the fluid, which means that it isn't going to affect the distribution of the fluid.
Now from here it must be clear that the liquid is forming a kind of gravitational well (it is definitely not the right term, but is quite useful) which causes the foam to accumulate on the center.