Two perfect metaphors
An old article on the development of the AMC Gremlin mentions that Dick Teague was responsible for the name along with the basic design concept. Supposedly he liked the impish image and wasn't worried about the metaphorical use of 'gremlins' in engineering.
I don't think he was unworried about the metaphor. More likely he was using the metaphor. The Gremlin was meant to be a new answer to the VW Beetle, so a gremlin was meant to be analogous to a bug.
[In fact the Gremlin wasn't an answer because the VW wasn't a question. The Gremlin was properly designed to suit the purposes of American buyers who wanted a practical and thrifty and useful car, while the VW was improperly designed to suit the purposes of a motorized vehicle. VW was COOOOOL because hippie idiots like me mindlessly obeyed the Fashion Arbiters who instructed us that VW was COOOOOL. The COOOOOLness had NOTHING to do with its virtues as an automobile because VW had NO virtues as an automobile.]
At that time bugs and gremlins were
nearly synonymous in the world of engineering. Neither word was well-known outside engineering circles because computers hadn't yet invaded the home.
The engineering use of 'bug' goes back at least a century, and always refers to a
design defect in a mechanism, not just a generalized problem. Our folk etymology credits Grace Hopper for inventing the term, but she was just making a good pun on a perfectly familiar word.
The engineering use of 'gremlin' was more recent, and referred to an intermittent hard-to-trace problem. You can imagine little invisible pranksters causing such a problem.
So Teague was countering the VW, which was a total
design defect, with an AMC product, which was an
intermittent problem. Ramblers were well-designed and durable, but not especially reliable. They suffered from mysterious ignition failures that AMC dealers could never manage to find and fix.
Both names are perfect.