The battery does not supply the electrons in wire, they simply pump them, so disconnect the battery and you have simple disconnected the pump, the electrons remain in the wire just as fluid would remain in a pipe. Wires are not hollow pipes, they are pre-filled pipes.
A battery or generator is like your heart: it moves blood, but it does not create blood. When a generator stops, or when the metal circuit is opened, all the electrons stop where they are, and the wires remain filled with electric charges. But this isn't unexpected, because the wires were full of vast quantities of charge in the first place.