They are actually x-ray machines.
People often confuse two things: ‘seeing through clothes’ and ‘seeing naked body underneath’. Seeing the naked body below means seeing the skin and what is on the skin (the surface). However, the cameras that are used in airports, which ‘can see through clothes’, they show the shape of the body, not the surface, in a sense they also look through the body. There is some revelation, but generally more to the embarrassment of all parties than the amusement of one of them.
And as for the x-rays used, there is no risk at all because it is only used to detect mainly metallic objects that are between the clothes and the skin, they are weaker than the x-rays used in medicine.