You can remember the meaning of 魔法 with this easy mnemonic:
The devil (魔) cast an enchantment on the parliament so they wouldn't pass that law (法).
Using mnemonics to remember the meaning of Chinese characters like can have an enormous impact on how long to learn Mandarin it takes.