No, it wasn't planetary alignment at all and it wasn't the urban myth about rooting and wiping the battery calibration stats (sorry, Nobi was just wrong, although a lot of people still believe that).
Imagine a bucket - that's your battery.
Imagine water flowing in - that's the charger.
Imagine your phone turned completely off.
Put it on the charger.
You are simply filling the bucket - but it actually has a pin hole leak in the bottom.
Charge the phone while running - the amount of water flowing into the bucket doesn't change - but now you've opened a valve on the bottom of the bucket - it's going to take longer to fill than when off.
Now make the phone unnaturally busy - you've just opened the valve all the way and water is gushing out while you're trying to fill it.
And a screwed up cache makes the phone very busy.
At that point, the operating system is running wrong.
But wait, there's more.
How is charging controlled while it's running?
How does the battery indicator know what to say?
There are no shortcuts and no surprises - everything - everything - you experience about battery use is through a set of built-in apps processes running in the operating system - and a little bit in actual firmware and hardware.
And because the cache is wrong, the operating system is wrong, and therefore apps and processes WILL be wrong.
Just a matter of where.
I've had a tangled cache kick my keyboard into Spanish, no way to fix it normally including uninstall and reinstall - because the problem was in the cache.
You've just had a tangled cache cause your phone to run harder and a battery indicator to go haywire.
No voodoo involved - just an understandable error state.
And also the basis for other advice you'll see about a factory data reset fixing everything - that's the one and only way for a non-rooted phone to clear both Android caches, all app caches and any corrupted app data.
That's the nuclear option.
But more often you can just clear the main cache and the cache on app still misbehaving after that and you'll be fine.