You live in Netherlands according to a recent comment; I can't believe taxis are almost 4x more expensive, unless you're stuck in traffic for a long time, but then your burger can't arrive in 30 mins?
And free delivery on €6 food item is almost certainly netting them a loss.
In much of the world the price of food delivery has risen to the level needed to make it profitable, and it's not cheap. I paid around $10 in fees plus Uber's 30-50% markups on the food itself to get a couple of burritos yesterday from a shop a mile down the road.
The only solution to the riddle I can think of is that (like postal services) they can cleverly combine orders and rarely lose money on delivery. The fast delivery would have to be luck or perhaps the burger preserves poorly?
That the food is absolutely fantastic might also have something to do with it. If they can get food into your mouth repetition is almost guaranteed.