Quotes are NEEDED when the property name contains spaces or other odd characters otherwise they are optional.
Let's put it this way, quotes will always work.
This goes hand in hand with square bracket notation. Square bracket notation will always work for accessing an object property whereas dot notation is only possibly with "good property names"
Ps
This is a JavaScript thing (not a node-red thing, also not JSON). to be clear JSON is ALWAYS a string. JSON stands for JavaScript object notation. I.e a string representation of a JavaScript object. What you are doing here, in a function, in all your examples is creating JavaScript objects. They only "look like" JSON because... Well.. JSON is a string representation of a JavaScript object !
In an inject node, a change node and a template node, quotes are required around all object keys.
The function node is the exception to this rule, where they are optional except if the key contains spaces (etc)
That is because there you are entering a JSON string. In a function node you are using javascript to define a js object, which is not JSON. This confusion between JSON and javascript objects is one that continually causes comes up. Even in the title of this thread 'JSON' is used, but then the question raised is not about JSON but is with javascript object definition.