When did you have your babies? Years and years ago mum go a quick post labour cuddle (like a few minutes) then baby was whisked away to be checked , cleaned , dressed and placed inthe nursery. So it might be a couple of hours before baby is brought to mum for feeding .
I can totally see how it could happen. I suspect that there are more cases like this in history that just remain unknown.
I remember listening to a podcast once where it described a situation in the sixties where a woman who had given birth at home and baby had had to go to hospital. A nurse dropped the baby back home later that night. But a couple hours later a different nurse turns up with another baby! Turned out a woman over the street had also given birth so the nurse took that baby to the neighbours house.
When the grandchildren heard this story decades later they pointed out how did the mums know whose child was whose. But no one wanted to find out so they left it as it was.