Track bike sprinters were used as the example. To get legs like them you HAVE to squat,they lift legs 2-3 times a week. The ones with impressive legs squat close to 2.5x their bodyweight.
Google and YouTube are your friend.
NO - you don't HAVE to squat. You can, but it is not necessary. Why? Because the success of a track racer in cycling is based on high cadence. High cadence literally makes your thighs explode in size.
Real life experience is my friend, lol. I have raced road and track since I was 15. I raced crits (flat circuit races) until about 5 years ago and had 25" thighs- and I never touched a weight. One of my close friends crossed over from short track speed skating and had 28" thighs. Truly amazing. He never touched a weight.
So to bring it back to the original poster's question, yes you can get big hamstrings (and big thighs) from cycling sprints only.
High cadence cycling training, starting at 1:15 in the video. Literally the fastest cyclist in the world.