Chainrings, derailleurs, cassettes on mid-range bikes are made of lighter metals and to tighter tolerances than those on cheaper bikes. You'll replace them 3x as often and pay 3x as much for the parts, so maintenance is an order of magnitude more expensive per kilometre.
There are some exceptions: higher-quality bottom brackets seem to last longer, and on a cheap bike it may not be worth replacing them at all. Maybe wheel bearings too. And some basic services like chain lube are going to cost the same (whether you do it yourself or take it to a bike shop). But overall, the cost of maintenance goes up faster than the initial price of the bike.