It is the case that what is “under the hood” is not immediately obvious. However, it does not mean doing something sub rosa, in secret, or even without observation.
It is metaphorically used to express getting into the details, getting to understand how something really works.
The vast majority of NGram entries are literal, relating to automobiles. (Beware the Hood Act, and what is and is not required under the Hood Act, for false positives.j
Ross Perot in his 1992 presidential campaign vowed to “get under the hood” of the American economy:
Perot’s brand of plainspoken populism—he vowed to “get under the hood” and fix the American economy.
(From an article in The Atlantic.)
Around the turn of the century, the metaphorical use was often applied to the internal workings of computer programming and computer operating systems.