Are those truly x-ray machines? Not just magnetic coils? Seems overkill and I'd object to being exposed to ionizing radiation just for the purpose of validating my claim that I don't carry any electronic communication devices.
It's actually a pretty standard setup in China anyway... Pretty much anytime you go onto an inter-city bus / train or into a crowded space (museum / exhibition centre) you will go through a metal detector and your bag through an x-ray machine. So it makes sense that they'd just use the standard setup that the local security company would be used to.
No, it wasn't there from the start. The no electronics policy only started within the last two years. I know someone who has been there and has the pictures on her phone.