Why do people invent slogans such as "work makes you free," and further more, why do people respond to them, enthusiastically?
This slogan was over the gates of Auschwitz. It is deeply ironic because it proclaims a positive value for a place of inhuman suffering and death.
People invent slogans such as "work makes you free" (arbeit macht frei) to give them incentive, motivation or even hope (even if it is false hope). This is a form of propaganda devised to give at least some spiritual solace to the prisoners who worked at the camps, even if it is a bold-faced lie. A similar tactic was used in America during the era of slavery. Slaves were given religion and told that the toil and suffering they experienced in this world would be rewarded in the afterlife. In the Holocaust, "work makes you free" was one of many false promises proclaimed to the prisoners of the camps. It was intended by some to indicate a temporary solution (work for a while and you will become free). This was, of course, a complete lie because the final goal was a genocide.
People respond to such phrases because propaganda is effective. Think of propaganda like advertising. People may criticize commercials and advertising in general, but they still buy the products. This might sound like an inappropriate analogy but the effect of propaganda and advertising is quite similar.
As for responding "enthusiastically," I would that it depends on the circumstances. For instance, many Germans responded enthusiastically to the Nazi propaganda slogans (sieg heil) because many thought the Nazi's would make Germany into a world power. But I don't think Jews or anyone forced into concentration camps responded with enthusiasm. They worked because they feared a more immediate death.