The relay switching ON and OFF produces AC, this is a VERY old circuit (pre semiconductors) - such devices were used to power valve car radios long before transistors became available. They were called 'vibrators', they came in two types - asyncronous (similar to the circuit above, and requiring a rectifer on the output), or syncronous (these had extra contacts for the output side as well, and didn't require a seperate rectifer, the extra contacts reverse the output in sync with the polarity changes).
WW2 radios used similar devices, or even rotary converters - a low voltage motor driving a high voltage dynamo.
In fact the actual circuit itself is even older than that, it was used in Victorian times as a party trick - known as 'shocking coils'. People stood in a big circle holding hands, with those at the ends of the circle each holding one of the contacts.
We actually did this at junior school in the early 1960's! - imagine the uproar if you tried to do it now!.