On the way to his very first rave ever, Tony Hsieh, 26 years old and not yet the CEO of e-commerce site Zappos, was already excited for the night to be over. He found electronic music annoying and didn’t understand the appeal of packing into a space to dance to some repetitive beat without words. As he waited in the 20 minute line outside the gigantic empty warehouse, he secretly wondered how long he’d have to stay there.

“What I experienced next changed my perspective forever,” he writes in his book Delivering Happiness: A Path To Profits, Passion, And Purpose.

The people packed into the enormous warehouse were dancing differently than anything he’d ever seen at in a nightclub. Instead of grinding against each other, the people all faced the DJ, who seemed to be channeling his energy to the pulsing crowd.

“The entire room felt like one massive, united tribe of thousands of people,” he writes. “I felt a sense of experiential epiphany. It swept through my entire being.”

The throb of the electronic music, he realized, felt like a heartbeat and it was as if the existence of individual consciousness had been replaced by a group consciousness.

“Everyone in the room had a shared purpose,” he writes. “We were all contributors to the collective rave experience.”

Hsieh fell in love with that connectedness and raving became a big part of his life. Although he has said in interviews that, at 40, he no longer attends the all-night dance parties of his youth, his rave-obsession hugely influenced his views on management and happiness in general.

At the time of that first rave, he had already made a fortune from selling his first startup, LinkExchange, to Microsoft for $265 million when he was only 24.

His entrepreneurial drive had cropped up much earlier though: He started a worm-farming business when he was nine, which flopped, and a button-making business in middle school through which he pulled in about $200 a month. He also created his own newsletter, selling it for $5 a copy and charging $20 for a full-page ad. In college at Harvard, he sold study guides to fellow classmates for $20 a pop.

He and a friend from Harvard, Sanjay Madan, started adverting company LinkExchange after graduation. Hsieh originally had a job at Oracle, but had quit because he found the corporate environment boring.

After LinkExchange’s major exit to Microscoft, Hsieh invested $500,000 in a startup called ShoeSite. ShoeSite soon became Zappos and Hsieh eventually became its CEO. He moved its headquarters to Las Vegas in 2004 and the company became known for its almost-insane customer service and quirky company culture. In 2009, Amazon bought Zappos in a deal worth $1.2 billion.

How did Hsieh’s experience with raving help him turn Zappos into a billion-dollar company?

Partially because of a psychological concept called “the hive switch.” The idea, explored at length by Jonathan Haidt in “The Righteous Mind,” is that humans are mostly self-serving, but can occasionally tap into a desire to cooperate and work together. Certain experiences can trigger that group-mentality, which Haidt calls that the hive switch because it mirrors how bees work together for the benefit of the hive.

Hsieh found that his “hive switch” got turned on by raving.

“It was a feeling of unity with the other people in the space, unity with the music and with one another,” he told Playboy earlier this year.

Hsieh tries to evoke that sense of connectedness amongst Zapponians, the name given to Zappos employees.

One of the companies “ten commandments” is to “build a positive team and family spirit.”

Hsieg tries to achieve that partially through fostering a a wacky company culture that has included liberal shots of Grey Goose, a guy in a hot-dog suit doing back flips, Tutu Tuesdays, and a horse on the 10th floor of the office for Chinese New Year.

He wants employees to bond over their quirks, have plenty of creative freedom, but bond together through parties, outings, and adventures (Zappos holds parades through its offices all the time).

Like ravers all dance alone but move to the same beat, Zappos employees are appreciated for who they are and have their individual roles but work towards the greater goals of the company.

In his book, Hsieh also defines what he sees as the four tenets of happiness: “perceived control, perceived progress, connectedness (number and depth of your relationships, and vision/meaning (being part of something bigger than yourself).”

That last piece of Hsieh’s “happiness framework” connects back to what he learned while raving as well.

“Everyone in the room had a shared purpose,” he says of that first rave. “We were all contributors to the collective rave experience.”

This story originally appeared on Business Insider. Copyright 2014

VentureBeat's mission is to be a digital town square for technical decision-makers to gain knowledge about transformative enterprise technology and transact. Discover our Briefings.