On older routers the transmit/receive power on the antennas was nerfed out of the box. I believe the Linksys WRT54GL came at 30mW and could go to 70-100mW. The router could be overclocked and many features could be added. Many of these routers used the exact same hardware as higher priced models but were capped by firmware. It was equivalent to getting root in an android phone years ago when it offered huge benefits.
Just like rooting android, many features that people wanted were added into stock firmware (at least partially) and the benefits have decreased over time. I feel as though Tomato and OpenWRT/DDWRT projects have suffered over time and drastically declined in popularity. Flashing routers can still unlock many features on certain manufacturer models.
I have my AX-68U flashed with Merlin. It is stock firmware with many handy tweaks and features added. I have access to a full root command line over SSH, have a package manager, and many customizations. I have all traffic router through ADGuard which filters out virtually all ads via DNS blocking. I also have Skynet setup as an advanced firewall. The amount of blocked intrusion attempts and vulnerability scans coming in from overseas and domestic is insane. Both have been set and forget for me. There's tons of other features and packages that can be installed. I have a full filesystem and swap on my USB and it also serves as a fileserver. HDs can be hooked up and the router can serve as a plex server and run rtorrent/transmission. You can do pretty much anything you can do on a raspberry pi.
Adblocking and firewall customizations are really the most attractive features for flashing these days. The products now come with higher TX/RX power and there's not much gains to be had. The FCC has also enacted much stricter protections to stop people from using higher power or restricted channels. Previously it was easy to use restricted channels on hardware such as 2.4ghz channels 12, 13, and 14 which is illegal in the US. You may be able to unlock restricted channels on 5ghz now on the higher end and use 160mhz DFS channels at full power on certain hardware. This virtually eliminates wireless congestion because most other consumer hardware cannot do this.
Basically consumer routers used to suck ass. Flashing made them actually functional and was a necessity for some to unlock functionality that should have been included out of the box. The gains and features added via custom firmware have been dwindling over the years and many don't see it as worth it. Main features that are desired via router modifications are adblocking, firewalls, and VPN support. Adblocking is pretty awesome, as so much traffic is blocked from the start. According to Adguard I am blocking nearly 20% of my DNS traffic which is all trackers, ad servers, malicious URLs, smart device telemetry, and more. That alone is worth a great deal to me personally. Custom firmware also offers security updates even for products that are end of life or were never supported by the manufacturer to begin with.
Router custom firmware was also tied in with modem flashing. Many years ago you could pull configs to get business 100mbit+ internet on a cheap 10-15mbit residential cable connection. Used to do this years ago, but it is very much illegal. I had a modded surfboard modem which was achieving 150mbit in an area with terrible speeds available unless you forked over a small fortune for a business account.