Here’s how I understand it. Magnesium does not exist alone it’s coupled with another molecule or compound until it reaches your digestion. Then it is decoupled and absorbed as a free ion ready to be used as needed - in over 300 reactions and processes in your body. From mood to muscle contraction, sleep to heart function and the list goes on and on. So when you take a magnesium L-theronate (for cognitive function and anxiety induced sleep depro) the two decouple in your gut and are absorbed but they very well may meet again as and when your brain needs magnesium (l-theronate is the molecule needed to cross the blood brain barrier). The other compounds serve similar purposes with a target at some related group of bodily and cellular functions. When you eat nuts, seeds, greens, etc and you consume magnesium, it is also bound to other compounds that may or may not be needed. The supplement route is simply a way to provide magnesium and connect it to the likely compound or molecule you need for a targeted function.
tl;dr - there are like 8-10 magnesium supplements because over 300 cellular and bodily functions depend on magnesium and magnesium is a catalyst and never acts alone it’s always bound to something else (lots of something elses) depending on the function it is supporting.