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!.
Lol, we actually did this in our physics class a couple of weeks ago. The teacher brought in an old crank driven generator orignally used to charge REALLY old phones. So we all wet our palm and stood in a circle holding hands and he cranked the handle giving us all a shock.
that was ok, hurt a little until someone went and got a cordless drill, only me and another bloke were game enough to try it and held hands and the electrodes and got a massive shock that had our arms tingling for ages.
twas fun