According to the Oxford English Dictionary, the nature of the beast first appeared in the 1600s:
colloq. the nature of the beast : the (usually undesirable) inherent or essential quality or character of a person, event, circumstance, etc.
1678 J. Ray Coll. Eng. Prov. (ed. 2) 77 It's the nature o' th' beast.
John Ray's Collection of English Proverbs was a collection of proverbs from different languages, as well as a list of words, a fact noted by the title page shown here. However, it seems very possible that the phrase predates this notation. The phrase appears in a dictionary entry for nature, and the nature of the beast was used to give an example sentence.
It is possible that the phrase was well known enough that, by the time Ray compiled his list, it was an accepted idiom. However, his work is the first written usage, so we can definitely note the point at which the idiom existed. Because this is the first written usage, however, we cannot derive its origins--the phrase was written, but its precise origins were not.
That being said, the OED marks usage of beast which are related, and possibly point to the history of the phrase. In the entry of beast, two definitions are:
In early times, explicitly including man. Obs.
In later times, applied to the lower animals, as distinct from man. (First usage noted is in 1616)
The animal nature (in man). (first usage noted 1667)
The phrase the nature of the beast, having been recorded in 1678, may have been pulling on the first noted definition. That is, the nature of the beast was the inherent nature of man; that deepest essence within him. The later definitions may also work (as a beast is lower than man, "the nature of the beast" is the lower qualities within a man). The old usage of the term beast would explain the origins of the phrase--it was a normal definition of beast, which literally described the inner nature of man.
Money burns a hole in my pocket.
The Phrase Finder shows very old usages of the idiom, which clearly suggests a sense of urgency to get rid of something because it is supposedly too hot:
"It was only a bit of change, but it was plainly burning a hole in his pocket." As though it were something hot, he wanted to pull the money out--and get rid of it by spending it. This can be used of almost anything that a new owner wants to use or spend right away.
- In the 18th century it was sometimes expressed as "burning in one's pocket" or something similar. Two examples cited by the OED are 1740 MRS. DELANY Autobiog. & Corr. II. 165 The post brought me your letter, which burnt in my pocket. 1768 TUCKER Lt. Nat. I. 152 Children..cannot rest till they get rid of their money, or, as we say, it burns in their pockets."
The more modern version appeared at least as early as the 19th century: "1857 TROLLOPE Three Clerks II. ix. 198 How was she to give him the purse? It was burning a hole in her pocket till she could do so." (Example quoted in the OED, s.v. burn.)
Best Answer
TL;DR: The metaphor seems to have originated in the 1940s in the context of marketing (although a source below suggests that the term originated in the context of psychotherapy). The term then slowly made its way into politics in the 1980s.
This entry from Google Books provides a good insight regarding the history of the phrase hot button—
From Quoth the Maven: More on Language from William Safire by William Safire:
However, there's a note at the end asserting that the term does not come from marketing, but from psychotherapy:
The earliest usage of the phrase I could find was from a magazine published in 1956—
From Kiplinger's Personal Finance, Feb 1956:
[There are, of course, earlier instances of the term being used, either in snippet views (verifying the date of publication is an issue, however) or verbal form (not recorded as a written work).]
Most notably, the term was used by Jack Lacy (one of the best-known freelance professional sales trainer since World War II) in one, or few, of his lectures about salesmanship in, what I assume, the 1940s. Since Jack Lacy discovered the techniques of "hot button salesmanship", it is likely that Jack Lacy was indeed the originator of the metaphorical hot button.
But why use hot and button?
According to Merriam Webster, a button is:
Which is essentially a sort of trigger. And hot refers to the emotional reaction (which can vary depending on the context; anger, frustration, excited [with anger], etc.) that the button, when pushed, will trigger. In other words, a hot button is an emotional trigger.
In a psychological point of view:
In a political point of view:
In a marketing point of view:
Here's a well-explained meaning of hot button from The Skilled Facilitator: [...] by Roger M. Schwarz: