I think keeping it out is not really possible. Live rock probably carried it regardless.
Algae and such is kept in check by limiting nutrients to feed it, by getting into a good setup and cleaning routine.
Being up for a couple years before, might have had some build up of nutrients in the sand or rock that are leeching out now, or with the moving and new setup it could be just a case of the disturbance tossed things out of wack a bit. Doing so tank could go through a bit of a ugly stage much like new start up tanks where algae ect shows up in force and then will fade.
To make sure the tank after the move is running well we can check a few things.
Whats your cleaning routine and equipment right now?
Also does the tank have a sandbed and is the sandbed the same one that was in it prior to you taking it over?
Hows the parameters on the tank? Test kit results?
Sometimes taking over a tank has its own challenges
But we can get ahead of it, if it needs it.