A significant number of people run their MacBooks in clamshell mode, they would already have a keyboard, mouse/trackpad and a monitor. With respect to keyboards, some people prefer mechanical keys over a laptop keyboard or prefer a keyboard with a numeric keypad - these would be buying a separate keyboard anyway. One can get a a usable keyboard and mouse for under $100, if they don't already have one lying around. If one needs an Ethernet port, the Mini has one built-in
As for displays, someone with vision problems may not be able to benefit from a Retina display, but would benefit from a much larger than will fit on a laptop. This way they can get a better display for their needs and not have the money sunk in a less usable laptop display. These displays are pretty cheap, with some coming under your $171 figure.
When it comes to upgrading, the keyboard, mouse/trackpad and display can last for a decade or longer, so there is less to replace in an upgrade.
I was using a 2012 MBP for my desktop for 8 years, decided it was time to upgrade to a M1 machine and the Mini was the least expensive path to getting an M1. I bought a Thunderbolt Display a couple years after the 2012 MBP, so already had the most expensive accessory. The experience of using the Mini as a desktop was much better than the 2012 MBP.
Different people have different needs - some would be best using an MBA or MBP for their desktop, but others would be better off with a Mini or Studio. One telling point is that Apple has not offered a 27" iMac for several years, implying that customers are better off buying a Studio display and a Mini or Studio.