I'd imagine the batteries being switched for plastic explosive would be a simple way to take explosives onboard for unsophisticated attackers, turning on rules out that possibility. Not everyone who wants to blow stuff up is a hacker.
Wouldn’t plastic explosive have a different density to real batteries, and thus show up very obviously on the scanner?
The machines are tuned to highlight specific risky materials (such as liquids & gels).
At one point it was common to be asked to turn on laptops etc. But I haven’t seen them do that for years - presumably because the scanners have improved.
LiPo laptop battery is apparently around 1.8-2 g/cm3 (sorry can't find good figures), whilst C4 is 1.73 g/cm3. Not sure what the density resolution is like -- I'd guess it's poor because you can't tell what thickness/type of casing you're looking through from the luggage "xray"; I'd imagine it to be primarily good at relative density.