Pistons and in particular the skirts are an odd shape at room temperature so that when at running temp, of course, they will expand, but there's more expansion where there's more material, so areas like the bosses where there's more meat, they are 'smaller' than the thinner parts of the skirt. The shape can be calculated, but you need to also know the thermal expansion characteristics of the alloy they are made from. There's been a trend in recent years by some piston manufacturers to use a Hypereutectic Alloy which has a less thermal expansion but these pitons don't stand up well to pinking and detonation.
In days gone by, the shape was formed by Cam-grinding them. This isn't a machine for grinding Cams (though similar !) but one that can follow a template.
How much material can you remove from pistons ? Bit of a $64000 question that one. Pitons are generally made as light as they feel they can, especially with cast types, so there's seldom much you can safely remove from them.