A plumber or electrician comes to your house to perform the work. Manufacturing can happen anywhere a shop is setup and doesn't have to happen anywhere close to where the final product is used. The fact that you can outsource manufacturing work abroad is the difference.
Production style shops will usually pay peanuts because they have to compete with china or for ITAR stuff somewhere else in the country like Texas where the cost of living is cheaper than say the entire west coast. But being from the west coast, there are still plenty of shops that pay peanuts to machinists or machine operators.
Prototyping shops pay more on average because they need a machinists who are also programmers. These folks also tend to have a solid understanding of GD&T(IMO the least understood subject of our trade), G-codes, different controls, conversational and CAM, etc...
A machinist who can only adjust offsets, setup dedicated fixturing that wasn't made or designed by them, and has no clue what most of the codes in their program mean let alone can't program at all, isn't a valuable person. If shit hits the fan, can they solve the problem or do they have to raise their hand? Software engineers on the other hand HAVE to be problem solvers and the average joe can't do that job without significant experience. This is why they make 6 figures a year after college. Where as I can teach an average person to push a green button and pick apples out of a parts bin. It's not hard.
Where it starts to get difficult is when machinists actually need to understand a print and GD&T, and be able to program(whether conversationally or using CAM software) a part and understand what feeds and speeds to use and why and which order to do operations in for the best and most efficient results. Not to mention all the tricks you learn over the years to make things flat, or tweak a program for a different lot of material that cuts differently than the last(im thinking plastics here). This type of knowledge is mostly tribal and learned on the job.
Also, each machine manufacturer(or controller manufacturer) uses g-codes and controls their machines differently that one needs machine specific training to become proficient or at least to have a solid understanding of how they intended the machine to be used.
But I agree, machinists are undervalued. And programmers even more so. But how can we pay them more if we have to compete with the likes of china? Sure you can build a reputation as a shop and build a loyal customer base. But even then if you get too expensive, they might go somewhere else if they are on a tight budget.
One answer is automation. Build your CAM system to wipe your ass for you. Use robots and in machine inspection/adjusting where you can. Get your employees training to do that for you. But then what about prototyping shops that are trying new processes that have never been done before or require exclusively hands on work. Well, there is where your senior machinists come in.
It's a complex issue for sure and there are WAY more details to it than the examples i've listed.
Finding good people is hard. But where I would start is by hiring people who are excited and curious and want to nerd out on this stuff. If you hire people who just want a paycheck, then that's all you'll ever get. And when you get your nerdy and excited team members, please for the love of god, PAY THEM.
Another thing to keep in mind is don't expect lifelong employees. It's important for people to grow. If they out grow you, say thanks and help they move to a more challenging role. If you want to keep them, find new ways to expand your shops capabilities and take on the shit everyone else won't bid. Within reason of course as to not go broke. High risk/high reward.