The answer to your question.
My questions is why I don't have to add XY_1234 into the code on the site?
Your website login is somehow connected to your MS SQL Login. Whatever changes you do to the database uses that SQL login as your Schema name also. When you run code that has schema [dbo] it is replaced with your default SQL Schema Name. You are probably not seeing an error that says you don't have dbo permission. This usually happens on shared hosting.
Referencing the tables in a SQL Server database happens in this order
1. SERVERNAME
2. INSTANCE
3. DATABASE
4. SCHEMA
5. TABLE
The schema assigned to your user XY_1234 in the database you downloaded has a schema named XY_1234.
The normal naming convention of a database table from one server to another.
[SERVERNAME]\[INSTANCE].[DATABASE].[SCHEMA].[TABLE]
Additionally: Your last paragraph about editing the database and uploading it... Are you collecting data from the web using your website or are you only displaying data that does not change through your website?
If you're changing a live database which is updated by the website, restoring a database with changes will cause you to lose information that was captured since the last backup. You might want to create change scripts that you can run against that database on your website. I would test those on your local server first.