Machine, AI, being, God? The best guarded secret of the country of Egypt, Former Earth. One which secured them their galactic future and survival, at the same time, damning them in the eyes of every nation of the Republic for an eternity.
Believable magic, like ordinary physicis, operates according to some invariable laws that always result in some kind of cost or "bounce back". The grater the magic, the more it should cost the character physically, emotionally, and spiritually.