It's not that Digikey or mouser is taking those inexpensive overseas solenoids and marking them up.
The products on mouser and digikey are from reputable industrial component manufacturers. They have warranties and datasheets, support from the mfg, traceability and trustability, etc.
They're simply different products. You can't compare a quality made product from a quality supplier and manufacturer to cheap crap you buy on amazon