NOTE: not best answer - just from the top of my head - you should probably research more -
this is really simplified
Basics -
Mg ions can "activate" some enzymes
EDTA - chelates - picks up Mg ions
Assays - depends on what you are doing - isolating DNA, cutting it, ligating it. copying it, etc
so - you want to store DNA - it is usually done in a buffer with EDTA - one would not want enzymes to break down DNA
Now you want to "cut" the DNA - you might need Mg to "activate" the enzyme, so you have to added Mg - note it is usually more because it has to conpensate for the EDTA the DNA was stored in