How does this time-stamping system work? There is an online tool called Proof of Existence which uses the bitcoin blockchain to time-stamp documents. I'm reading the documentation but I fail to see how it works. I understand that it adds some hash code to the blockchain, but I can't see how this is a provable proof of the existence of a file.
In particular, the documentation states:

The document is certified via embedding its SHA256 digest in the bitcoin blockchain. This is done by generating a special bitcoin transaction that encodes/contains the hash via an OP_RETURN script. This is a bitcoin scripting opcode that marks the transaction output as provably unspendable and allows a small amount of data to be inserted, which in our case is the document's hash, plus a marker to identify all of our transactions.
Once the transaction is confirmed, the document is permanently certified and proven to exist at least as early as the time the transaction was confirmed.

And then:

If anyone wants to manually confirm the document's existence at the timestamped time, they should just follow these steps:

Calculate the document's SHA256 digest.
Find a transaction in the bitcoin blockchain containing an OP_RETURN output with the document's hash prepended by our marker bytes, which are 0x444f4350524f4f46 (or 'DOCPROOF' in ascii).
Some online services like Coin Secrets or blockchain.info's list can help you locate OP_RETURN transactions more easily.
The existence of that transaction in the blockchain proves that the document existed at the time the transaction got included into a block.


But what if someone has a copy of (e.g. steals) the original file? How can I certify I was the original owner? I just cannot see how it works. There is no identity proof.
Compare with a more traditional certification process. If I go to a legal entity that can make a proof of the document with my identity and date, it doesn't matter that someone steals it from me, because the document is certified with my identity. Since the blockchain is anonymous, this does not work. Can anyone explain please?
But what if someone has a copy of (e.g. steals) the original file? How can I certify I was the original owner?


If you want to use the bitcoin blockchain as timestamped proof that you had the idea (document) first, then you’d need to be the first one to submit the document for a time stamp. A timestamp doesn’t prove ownership of an idea, just possession of it at that time. 


  If I go to a legal entity that can make a proof of the document with my identity and date, it doesn't matter that someone steals it from me, because the document is certified with my identity. Since the blockchain is anonymous, this does not work. Can anyone explain please?


You could simply add your name to the document that is being timestamped to prove that you were the one that submitted the document at that time. Since only a document hash is stored, this wouldn’t sacrifice your privacy at all. 

Alternatively, if you created the OP_RETURN transaction yourself, then you could sign a message using the private key of the bitcoin address that was used as input to the transaction. This would prove you have the private key that was used to sign the transaction that timestamped the data.