What is this orange residue in my water heater?
That is rust from the cover you took off. It is harmless. If the water heater is in a laundry room, some water probably got splashed on the tank and ran down behind the cover.   The covers are never painted as good on the back as they are on the front so they rust easier there. The great news is there's no sign of rust inside by the thermostat and heating element. If it really bothers you, you can rub it down with some emery paper and spray some Rust-Oleum on it.