Cast Iron will distort from residual stresses left over from the casting Process. I believe that most castings are stress relieved prior to machining as nobody wants to wait for them to weather anymore.
Distortion can also occur at machining when the skin of the casting is removed from one side, leaves the machined side stress free and the non machined side in tension.
The key elements are a good stable and braced casting design coupled with good practice and quality machining, the problem is that with some cheap Iron beds that the above 3 elements are not always included.
I am not saying that all cheap Iron Tables are rubbish but buyer beware, and check with a straight edge. Although with a good piece of thick float glass, some engineers blue, a good keen scraper and some time a wonderful flat table can be produced. That is the best part of Iron beds, if they are warped they can be scraped flat again and again.
Bean