But if the prices are way higher, then 5Guys sees that by setting prices a bit lower it can capture 90% of the market, rather than 50%. Which is way more total profit.
That's how downwards price pressure in capitalism works -- by reducing price you gain market share and increase profit overall. Otherwise, under capitalism, all our prices would be sky-high!