Some people don't get along with their bosses because they don't understand what management does and why it is necessary. I've seen this many times, especially in project teams of technical people who chafe at the concept of being managed. "Just stop asking questions and let us do our job" or "Do you want me to finish this code or do you want me to tell you how I'm going to finish it" are typical responses from people who don't understand (or haven't seen) the value of management.
The truth is that once you get about four or five people in a project, someone needs to take charge. Decisions need to be made, implications need to be considered, disputes have to be resolved and people need to be held accountable to their commitments. Budgets and timelines may need to be developed and monitored. And someone needs to have the 'big picture' of the project and how it fits in to the rest of the company: what inputs the project needs to be successful and what outputs it is expected to produce. This oversight function can be a part-time job only in the smallest projects. Most of the time it requires full-time attention.