They aren't miserable because they are in a cube, they're probably miserable because they hate their jobs.
I work in a cube. Hate the cube, love my job. You won't see me miserable at work, but I look to my left and to my right, they look awful. They need to go do something else. I'd love to own a private fishing tour boat in hawaii or central america. But it doesn't mean I won't be happy until then.
I sit at a desk all day, in theory. We have open floor plan - no cubes. So, it's even worse. Much distraction. People 2 feet away from you. 0 privacy.
But, i'm also hardly ever at my desk, and that's why the office is designed this way. It's meant to be open and active.
I'm at client sites, i'm in meeting rooms, i'm collab'ing with my peers, i'm whiteboarding/design sessions, I'm coaching junior staff on the ways of life, I'm solving crazy problems, building Skynet AI systems and machine learning, I'm selling million dollar deals from a 5 slide ppt because I know my shit and people NEED my team.