We used to use wax, perspex or tin for prototypes ( perspex or tin, for the functional parts ). The finish is normally quite good depending on the toolpath ( scallop height, etc...). However, we now use a 3D printer for the production of samples which we find better still.
Never used foam though. The wax normally gave the best finish.
When I was in school we used wax also. We turned it on a cnc lathe. It works good when learning because it is soft and will not harm tooling if a mistake is made in the code. So, I can see where it would work nice on prototypes.
We used wax to machine aircraft gear box prototypes on cnc mills. We had an oil reservoir on one that was designed to have a .040 thk wall. We were a little nervous about the wax holding up but it worked out good. And like chadholt said it is very forgiving when you program a bad tool path.