I would agree, it's part luck and part environmental. But sometimes one leads to the other.
Back when I was a ftm, or even second time, I used to despair at the smug mums and dads who'd say "oh, we expected them to sleep" and "oh, always put them down drowsy but awake" and "I made sure from birth that she would go to other people".
Take DD2. If you put her down awake in any way then, from birth, that would result in agonised 'I think I might die' screams. Which would escalate and escalate (I know, because sometimes it had to happen in the car, or because I had to leave her for a few minutes to deal with putting DD1 to bed or whatever). From birth, you couldn't pass her to anyone else (even DH, which was hard) without her becoming a screaming mess. As soon as she could cry tears, there would be big fat sobbing tears.
So you don't very often. Because having a baby who has worked themselves up to the point off sweaty, swollen eyed, coughing desperation is no fun for anyone. (DS on the other hand, is a model baby for being happy to hang out with anyone. And has been from birth).
And people say "oh, don't feed them when they wake". And yes, feeding them back to sleep each time might be reinforcing associations you'll have to break later. But take DD1, she wouldn't settle without a feed (believe me, we tried everything). She just wouldn't. We did everything 'right' with her, and still ended up with a baby we ended up doing CCing with at 11 months, after three long months of trying to get her to settle without a feed. With DD2, I couldn't spend 2-5am every night for three months patting her as I had with DD1. I had to parent the next day.
I think a bad sleeper can often be improved. I think a bad sleeper can probably be made worse (though sometimes out of necessity). I don't think a bad sleeper miraculously becomes a good one because you are somehow a good parent. The mere fact that you can implement strategies like 'drowsy but awake' means you didn't have that bad a sleeper before you started.
Now I'm on my third child, I shrug off all the smugness. Parenting is a long game, and the smug parent will normally have their own challenge somewhere down the line with something you find easy.
My sympathies OP. Sorry if you've said this, but are all the night feeds bottle? If so, you might want to think about night weaning as a first step (much easier to do with a bottle as you can reduce the amount, or water down the feed). You may find that, by the time it's a tiny amount, or mostly water, she stops bothering waking up.
If you'd like a non hysterical take on CIO/CC, there is a website called Troublesome Tots which is pretty good.