Internships definitely help (GAFAM uses them like extended interviews for full time offers). I also think it helps that my gpa was ok (3.05) and the school i went to (purdue) was highly ranked enough and big enough that we had entire recruiting teams come out to our career fairs which is where I got my first internship. Some companies even sent out employees for an entire week to our campus to do interviews for internship and new grad hiring.
This isn't a glamorous story where my network made me a millionaire, but my life would be much worse having not made those friends back then.