An ideal company is a mix of both, but which policies are ‘imposed from above’ and which are allowed to ‘boil up from the bottom’ is usually an endless source of discussion - I wonder which way Intel is going
The best company I've ever worked at (retail, surprisingly) squared the circle thusly:
Strategy (i.e. goals, culture, priorities) flowed top-down. And the company spent serious time doing it pervasively and well.
Solutions (i.e. implementations, features, products) flowed bottom-up.
Part of their corporate culture was that a manager above team level should never suggest how to do something. You could bounce ideas off them, but they were pretty serious about it being the person doing the implementation work's decision.
In practice, at the flat organization, there were ways that the people at the top were able to impose their views and preferences on the company. Most obviously, the folks who had been at the company for a long time were friends with the owners, and they had a lot of unofficial influence over things went, even if there was no org chart putting them over other people. If a change seemed good and necessary to the in-group, then they were in a position to enforce it. If it did not, there was no way to get them to go along with it.
Also, in practice, at the taller organization, there are a lot of bottom-up decisions anyway. It's just that those decisions get to be in fact bottom up - I go to my manager, who talks to some other manager while I keep hacking on something else, and either that manager agrees, or more likely they point out something else and my manager comes back to me with a more balanced alternative. At the flat organization, decisions were bottom sideways. I had to go to a bunch of ICs from different teams and try to convince them of the merits of some idea, and if they had conflicting goals, I had to mediate that myself.
I'm much happier at the taller organization which has a paperwork-heavy performance review and promotion process (compared to the flat organization, which also had no titles and where performance reviews were a brief closed-door meeting with the one manager between you and the owners). I find it works better for me: I understand better other people's expectations of me and I am better able to communicate what I want to change too. It's extra time, but it's well worth it for the predictability, and I feel much more supported trying to make difficult cross-team changes.
It doesn't work for everyone, of course; different people have different personalities.
Hierarchy will naturally appear in some form as we try to achieve something that requires more than handful, I'm sure there is some sort of inflexion point but not sure exactly what that is.
The opposite end of the spectrum is "flat" orgs, like Valve software, who have few/no managers. In a flat org, all decisions are bottom up.