The thing about finding an opportunity, or finding a job, is a matter of being the right fit at the right time. After all, you need to have something that someone who was hiring is looking for, which is why having a wider "net" gives you a better chance of you having just the right qualification.
I got into Accelerator physics because the group was looking for someone with a background in (i) photoemission and (ii) thin film fabrication. I did my postdoc in photoemission spectroscopy, and before I started my PhD research, I actually made thin films of NbN and was in the process of constructing a deposition chamber to produce GaN films when I got a RA to go into superconductivity. So something that wasn't even part of my PhD research was the skill that helped me to get hired.
A student once asked me what was the most valuable and important thing that I learned as a student all through the end of my graduate school. She thought it might have been quantum mechanics, or relativity, etc. My reply was that the most important thing that I learned is how to learn. By the time I finished school, I understand how *I* learn things, what is needed for me to learn new things, and my technique in how I approach and solve a problem. To me, THAT is the most important thing that I learned, because even with a PhD, you will STILL need to learn a lot of new things, especially if you make a hard-turn in your area of specialty. It is the skill that enable you to learn new things that is important when you finished your PhD. It is not unusual at all for someone to change fields, to go into new fields, or to discover new connections with something he/she already know.
There is very seldom a linear trajectory in anyone's career, or life for that matter. To survive and even thrive, one must have the capability to adapt and to learn.
Zz.