I understand that the question is basically "Why Feudalism?" - but. I understand how the system itself works. I don't understand how you, being a leader, agree to give some warrior great power on big territory, potentially creating a timebomb. And it happened in so many places so there must be something I'm missing. So what is it?
What you are "missing" is the order in which things occur.
Instead of thinking about Kings as being supreme overlords/rulers who delegate responsibility and give pieces of their territory out, think of it in the opposite direction.
Powerful men control territories. Over time these territories consolidate and for a variety of reasons the various powerful men vie for authority over larger areas and over each other. At some point in many places one figure or family manages to come out on top, with tactic support from other powerful figures (though not necessarily all of them). In effect kings are really just supra-powerful nobles themselves, something they generally want other nobles and aristocrats to forget but which always lingers in the background.
In fact your question points to one of the major issues that kings have, which is that they are always aware that their control over other powerful figures is tenuous. Medieval rulers have to rule by consensus (as /u/DadsGonnaKillMe) points out or they risk being unseated or at least rebelled against.
What we see, then, is an ongoing struggle by kings to assert authority and to co-opt noble power, to essentially turn them into employees (or to replace them with employees). This process really only succeeds in the early modern period.
A really nice example of the early steps of consolidation and difficulty can be seen in the Norse Saga Heimskringla (available in lots of English translations). The section on Harald Fairhair's conquest and consolidation of Norway is particularly relevant. We see an ongoing struggle to conquer/kill/co-opt other chieftains and kings by Harald as he works to place himself as singular king of Norway. Even with all his successes "Norway" was still far from the territorial state we think of now and his children and children's children constantly struggled to maintain Harald's gains and to further consolidate and prevent powerful men from reasserting their own local authority (not always successfully).
Powerful men control territories. Over time these territories consolidate...one figure or family manages to come out on top, with tactic support...kings are really just supra-powerful nobles themselves
/u/Mediaevumed gave a good response but i think you're looking for something a bit different: why do we go from an Imperial Roman state to a feudal society since the Romans really did have larger tax systems.
One move is that we see the state granting individuals land in lieu of constant payment considering the fact it's really hard to collect taxes and reroute them to frontiers for payment. So with the decline of state power and wealth in part brought about by fragmentation and the corresponding decline of a more "integrated" Mediterranean economy (Ostrogothic italy kept a more tax and income [not the right technical term] centered fiscal policy longer than say Gaul and Spain but we see a continuous steep period of decline in these processes over the late antique period) the budgets of later Roman states/successor states were continuously squeezed. . The decline of a central state helps shift the balance over to increasing land grants for citizens who are inclined to pull away from the center and work on their own (reinforcing a system where the king really is a powerful noble as opposed to say a Byzantine Emperor in the 4th century with a massive bureaucracy). So the tl;dr of my point would be paying people salaries is really hard and requires a level of state strength that lots of states just simply lacked.
There are a couple of interesting papers i can point to but i would need to look around a bit for them. Tell me if interested.