We use this to mean that even though full legal right to a thing has not been established, he who is in possession of it has a far greater right to it than has everybody else.
The original meaning (seventeenth century) was rather different. If in a legal action to establish the ownership of property – say a piece of land – neither side was able to establish title (written proof or right), certain points had to be settled before a decision could be reached. Sometimes there were twelve of these, sometimes ten, and it was more than likely that most of them would be settled in favour of the person who was in actual possession of the property.