At one point (2015-09-09), there were no trains running between Germany and Denmark. Denmark announced it would return any migrants/refugees who do not wish to seek asylum in Denmark, back to Germany (article in German). It appears those migrants/refugees aimed to go to Sweden. Why did Denmark wish to stop this? Is it just because of the inconvenience of migrants/refugees transiting through Denmark, or is there a more fundamental reason?
Fear of a Calais-like situation on the border with Sweden should the Swedes get cold feet? (Until now, it's by far the most generous country in Europe by many measures like the number of refugees relative to the population or the success rate of applications.) Apparently Denmark is OK with processing asylum applications as long as refugees agree to get into the system and they also practice indefinite detention for illegal aliens in some cases but what they definitely don't want is people on the streets
Also, you probably know that, but immigration has been politically toxic for many years in Denmark. They are harsher and more hostile than neighbouring countries in many respects (detention, spouse visas…) But at the same time, they are very “by the book” and I can easily imagine that the Danish police would have none of the cat and mouse game the French police are playing at the border with Italy. So they do what they absolutely have to according to international law (examine the requests of the people who reached the border) but nothing else that might make them look “soft” like allowing transit.