You're not paying $5 for the cup. You're paying $5 for the guy making it for you at a moment's notice, for the warm couch to sit in while you drink it, and for the other guy who comes after you leave and cleans after you.
People have been paying money for food and beverages forever. The cost of labor is a big factor in it. It's the foundation of the economy.