I started in hardware and pivoted to software for the same reason: It's easier to find higher paying jobs.
It's been strange to see the gap persist at companies that cling to salary data for compensation decisions. Incredible to see companies complain about not being able to find good hardware talent but then also refuse to pay hardware hires at the same level as software hires.