For someone who attended a state school (Penn State) and then tranferred to an Ivy Leage school (Penn), I can give an opinion on this question.
I was initially not accepted to Penn, which was my first choice school out of high school so I decided to go to Penn State for a year, which was cheap and relatively good.
I took a number of honors classes at PSU and was able to get a 4.0GPA my first semester without too much difficulty. I did almost as well second semester. I then applied for transfer admission, and was accepted to Penn.
My sophomore year at Penn was truly a kick in the face. I was also taking hard classes such as calculus, orgo, and physics, but my GPA took a huge cut and found myself accustomed to getting B- or Bs in clases I thought I would get As in.
It took me a few months to re-learn how to study and eventually bring my GPA up Junior and Senior year, but it required paying a lot more attention to detail and being able to critically think about problems.
I was always a good student including HS (valedictorian and SAT 1500+), but at a top school everyone has similar qualifications, and makes it extremely difficult to obtain in A in science classes because you are being compared to everyone else on a curve.
The people that I know that aced their science classes are now at top med schools like Harvard, Penn, Duke, Columbia etc.