These questions are standard on most job descriptions in many countries. I can't speak to Berlin in particular, but it's generally not illegal to ask these questions in most countries where I've posted job descriptions.
Companies are expected to confirm that candidates are legally authorized to work in their country, and companies are also freely able to choose if they want to engage in the sponsorship process for candidates.
https://www.gesetze-im-internet.de/bgb/__622.html (obviously in German language)
You can negotiate other terms but only if they are not worse than what the law states.
If someone would send it to Tesla I'm sure they'd fix it. Looks more like an honest mistake than some intentional violation of a country's labor laws.