This rubs me the wrong way a bit, and it’s because it’s clearly quite obvious there are many reasons you’d want to get married fast (emergency health issues, unplanned pregnancies, visa issues, etc etc. can come up with a million reasons easily).
You are really asking in a very ungracious way why doesn’t everyone just simply live like an ideal German.
Most pregnancies take a while, two weeks is plenty of time. Don't even get me started on how long immigration bureaucracy takes -- two weeks is a drop in the bucket.
We've had a number of friends do the same due to similar issues, plus the German process can be very cost prohibitive once you start including official translators and such.
The Danish authorities accept a passport as a proof of ID, and the supporting documents can be in Danish, English or German.
The biggest issue was that we needed one of my documents (the birth certificate) to have a seal of authenticity from my home country, which then all needed to be translated officially. That took longer than it needed to because we didn't realise it needed to be authenticated and so we got it returned at one point and needed to resubmit it. But apart from that, it was mostly a case of waiting for the formalities to go through - that took a couple of months in total, but it required relatively little work overall. I suspect in total, getting married in another country would have taken more work to organise and arrange, although it would probably have been quicker with the right combination of country and pre-existing documents.
Hundreds of non-resident trees marry in Denmark every week.
https://medium.com/@msosacordero/how-to-get-married-in-denma...
I think most immigrants who get married in Germany are doing it for legal reasons primarily.
And in actual emergencies, these processes can be accelerated, like every other buerocratic process in Germany