There may be differnet reasons.
An extract from the German Wikipedia article about German gold reserves:
Die Bundesbank hatte das Edelmetall an den führenden Goldhandelsplätzen New York, London und Paris gekauft und dort belassen
Germany (or better the Bundesbank) bought the gold at the leading markets (NY, London, Paris) and never transported it away. Just imagine the problems of a safe transport of the gold.
Another topic: There are about 500.000 Euro costs to deposit it at the Bank of England. In USA and France it is free. Maybe it is cheaper to store it abroad?
And the last reason: Why do you think it is more protected at home? During WWII Germany conquered big parts of Europe and there where different Governments in exile. With gold abroad they still had access to there gold. The gold inside would be a capture of the conquerer. It is always a good idea to split the risk.
For your speculative question:
There were doubts, if the gold is still available. So let's bring it home ;)