nearly any group has an organizational structure chosen by the group itself.
If you wish to be a member/part of the group you will need to abide by the rules the group decides upon and to follow the leadership chosen by the group.
A church is no different.
The membership choses a pasture that reflects their beliefs. That pastor preaches those same beliefs from the pulpit and backs them up with references to the bible. Anyone in the membership who doesn’t like what is being preached ... can chose to leave... or can try to replace the paster with another closer to their beliefs.
Happens all the time.
I think that this description is accurate in mainline denominations but no so much in independent churches. The pastor or pastors are often not subject to any sort of outside accountability which in my opinion is dangerous.