WTH! .db statistics over 7million rows in ~4 months

From my understanding the long term statistics produces one entry an hour per id, so with 8 entities that should be 192 a day, and 5,760 every 30d. For the few pages I did look at, this did appear to be the case, 1 for each per hour. But somehow, since the first row in early august this has swollen to just over 7 million rows, creating a database of 1.5GB, ouch.
Corruption maybe?
I’m not sure what caused this but after deleting all bar the last 10 days, and accidently all of id 1, I am back down to a sensible 9MB and ~1900 rows. Initially I remove everything before the 1st of December (theoretically ~3/4 of the db) but this only reduced the rows by about 2 million.

I will monitor this to see if it reoccurs, I have full backups so if I find time I might be able to dig into the bd to find the issue (I would need advise on software etc for better viewing though).

Housekeeping
I am using HA for energy monitoring, so have recorder on, and have two “platform: statistics” with max_age: days: 7