I'm not sure about different national healthcare systems in this case...
I'm also a little confused about a part of the story. Don't take this the wrong way and please correct me if I'm wrong, but it sounds like they gave you the treatment you required and that which was available, after which you were no longer in need of medical care but simply needed a bed? In which case, a hotel room or something to the equivalent would perhaps have been more fitting? I'm not suggesting that they didn't kick you out because they could no longer make money off of you, but why pay for a hospital stay when you don't need a hospital stay? Unless you did still require further medical care but it didn't sound like it from your OP.
I'm trying to tie these two together... The thing with publicly funded healthcare is that there are usually wait times, backups, shortages of beds, etc. Not always, but usually, especially in the E.R. So I'm not that surprised you weren't allowed to stay, unless the place was surprisingly quiet. I'm also not surprised you weren't admitted onto another ward. I imagine that's probably the only way in which you could have secured a bed (without having inside connections), and well they wouldn't go through the process of an admission and discharge, considering what that entails in terms of administration and staffing, if there really was no need to. I imagine this might particularly be the case for publicly funded hospitals, which are likely to be short of medical staff anyways and certainly not overstaffed.
These are pretty much my speculations. But again, I'm really not sure.