(I recognize the term "amazing" is pretty ambiguous, but I'll leave you to interpret this term however you wish.)
Thanks for your thoughts, HN! :)
No, not the chat software.
The best company cultures I've been part of had 5% more people and time available than work that had to be done. That's almost unheard of in this day and age, but it makes all the difference in the world.
The stress and pressures and politics of trying to get 10% or 50% or 300% more done than you really have the resources for make people stressed and turn coworker relationships toxic. Everyone's just struggling to keep their heads above water, and sometimes they have to kick someone else or climb on their back simply in order not to drown.
A little extra time means people have the mental space and the space in their schedules to help one another, to find out what one another are doing (so people and departments can actually coordinate their work) and to get to know one another. People who are under less pressure and less stressed are less likely to snap at one another or resent others' requests and demands. It makes all the difference in the world.
You know what else helps? Walls.
If you've read and liked Peopleware, you should read Slack as well. If you haven't read either one then you should.
Humans are made to herd cognitively, getting that culture firmly in place to start with is actually harder than keeping it going. (Consistency and honesty can be hard when you're in charge and get get away with shit.)
Still, as others say, it's bloody tough. I would add that you have to be ready to confront and even fire people fast (for clear, previously stated reasons) if they really wander. If you can't filter out personality disorders, such as narcissistic personality disorders any culture will crumble, though.
One critical purpose of your mission statement should be to explain to anyone who's ever been fired why they were fired, and why they should have known from the get-go that they'd be fired for doing what they did.
When a company is struggling, people get insecure, start worrying more about who gets credit to avoid layoffs, a gloomy mood spreads to everyone, the company starts taking away goodies and people get resentful, and so on.
You could repeat the question with, "assuming two companies are in the same X financial state and changing at a rate of Y, what causes one to have a better culture than the other?", because there is clearly more too it than money.
Even so, the rest of the factors float on top of the money tide, and it makes a world of difference whether the tide is coming in or going out.
Nope it's science. Just do everything right as suggested by "Peopleware" and "The mythical man month".
Growth and new people cause the culture to shift. That's the biggest threat to the current culture of growing companies.
Responsibility. I have worked for a CEO who is first to take credit, last to take responsibility. He'll give instructions, and if you implement them but his plan fails, it's your fault. Prove you did exactly what he said, and it's still your responsibility.
Remuneration. Getting paid a fair amount, and not being expected to put unpaid overtime in. Not being expected to use your own equipment and resources for work that you must do or be fired, but aren't being paid for. No fiddling staff timesheets to make your budget.
Proper equipment. 10 year old computers might eventually do the job, but the desks they're sitting on collapse, the elevator doors won't close, one office uses a portable fluorescent lamp because the main one failed three months ago and nobody will authorize a replacement, the roof leaks near some high voltage equipment but again, nobody will authorize the repair, and the office chairs are all cast-offs from other departments that are outright dangerous to sit on.
Have policies for conflict resolution. I worked at a place where one manager was terrible at his job, so to distract he would fill out orders for street addresses that didn't exist and then persecute sales staff for not completing those orders. (I figured that one out because one of the addresses was about five doors from his home.) Same guy kept dossiers on the entire staff, stuff he could use to blame others for his failings. He would even take a dump and not flush, on days that he knew one particular person was coming in, and start rumors that this junior staff member was responsible. The CEO of that company sat back and allowed himself to be manipulated, knowing exactly what was going on, because it was easier than doing something about it. It all stopped when that manager left, too.
Sufficient staffing. One place I worked fired a third of their productive staff and replaced them with interns. Eventually, the interns left and we couldn't fill the roles because had people wised up. Nobody wants to do a full time job with the various liabilities involved for free, so we restaffed with volunteers. The volunteers weren't reliable, because volunteers.
Adequate training. Don't give them a quick verbal primer on a job and leave the new guy to it, then blame him when it goes wrong.
Actual emergency procedures. Had a fire started by a dusty lamp, it wasn't reported to the appropriate authorities, and we all lived on a knife edge wondering when it was going to happen again. (See responsibility.)
Honesty and integrity. One IT place I worked for would forge worksheets. The owner would add a few hours labor here and there, because the business wasn't making money (he had driven off all his customers) and Jesus wanted them to have money. (I am not making this up.) He also would go out on jobs and royally screw up the install, then send the staff out to fix it, and bill the client for the lot - even when it was a church.
Respect for others. Don't chase people down the street, shouting at them that their choice in OS or computer is wrong. Don't threaten staff that you'll get some thugs after them if you've not met your legal or contractual obligations.
Now, you might read this and think "but these are all so obvious and basic," yet you would be surprised how many businesses have a tough time with the obvious stuff. Many employers I've come across seem to think you owe them because they hired you.