Might not have had a qualified inpatient diagnosis code. Or maybe there wasn’t an inpatient bed available by the time you were ready for discharge. Pretty common these days. You can be an inpatient on paper, & still be physically located in the ER. You can be an observation/outpatient status and be physically inside the hospital too.
I dunno. I was told if it hadn't been for Covid I'd have been staying a bit longer. Didn't bother me near as much as it bothered Grumpy. Hospitals are good places to catch things you don't want.