Luxembourg's law is pretty similar to the one President Obama signed back in 2015 in that it gives mining companies the right to keep their loot. Both of them also take advantage of a loophole in the UN's Outer Space Treaty, which states that nations can't claim and occupy the moon and other celestial bodies. They don't give companies ownership of asteroids, after all, only the minerals they extract and after they extract it.
Unlike the US version, though, a company's major stakeholders don't need to be based in Luxembourg to enjoy its protection -- they only need to have an office in country. That said, any space corp interested in operating from the Grand Duchy must have obtained written permission from the country and must not have major shareholders who take money from terrorist groups.
The move didn't come out of left field for the tiny but wealthy European nation. Luxembourg made its first big space bet in 1985 when it supported Europe's first private satellite operator, which eventually became the largest in the world. It's one of the reasons why the country has one of the highest GPD per capita in the world.
In addition, the Grand Duchy has been investing in asteroid mining for years, even teaming up with Deep Space Industries to design an experimental spacecraft meant to test its mining technologies. It might take decades before anybody actually starts digging up minerals from asteroids, but by having a law that makes it clear where miners stand -- the first in Europe -- Luxembourg is securing its future in the industry.