The most common reason is that the wire is exposed somewhere and is shorting out to the tank. Or, the wire is loose. Or, the electrode is not positioned properly next to the pilot burner. Or,........................ But it had nothing to do with your changing the anode rod. If you had not turned off the gas to the heater, you would still have had the problem you just wouldn't have known about it because you would not have had to relight the pilot.