It had been in the works for a while, but now it has formally been adopted. From the article:
The regulation provides that by 2027 portable batteries incorporated into appliances should be removable and replaceable by the end-user, leaving sufficient time for operators to adapt the design of their products to this requirement.
How can the EU target only Android for this unlockable bootloader that you mention? Shouldn’t it apply to iOS as well?
It does apply to both, but there are no real OS alternatives for Apple hardware. Unlike android hardware where there are many custom roms available for most devices.