Where did it come from?
The spiders that live in the brain of Azrak-Hamway Incorporated.
StarTrek.com has a hilarious article talking about some of the insane licensed toys produced by AHI and Remco Toys (who AHI bought in 1974); the helmet came from them (emphasis theirs):
[T]he Enco Company must have drawn inspiration from the 1969 Remco Star Trek Astro-Helmet when they released their Official Star Trek Helmet in 1976. Enco took the ridiculous concept to all new heights of absurdity, however, by adding a movable visor, pull-out antennae and a large red "flashing light emitter with pulsing sonic sound."
The Astro-helmet, pictured below, also appears to have nothing to do with Star Trek, but is (slightly) less hilariously insane:
Okay, differently hilariously insane
I've not been able to find any logical reason why AHI decided this was an appropriate use of the Star Trek license, nor am I totally convinced any exist.
What does it have to do with Spock?
Nothing whatsoever. According to the StarTrek.com article I mentioned before, the helmet came with multiple stickers, so the unfortunate lucky child could personalize their helmet with the name of their favourite character:
Perhaps the coolest feature of all, though, was the inclusion of a large sticker sheet, allowing the owner to customize the helmet with their favorite Star Trek character's name!
The article includes another picture of the helmet, this time with Kirk's name:
The decision to use Spock's name sticker on the box appears to have been a marketing decision, motivated by whatever drugs market research AHI did whilst crafting this magnificent specimen.
An old auction site has several more pictures of this madness, with no name to be found: