Well, I did by dint of being
incredibly lazy throughout my undergrad, but clearly smart (engaging with the material, but not doing enough work).
I was pretty lazy in my UG, and (for the first time in my life) competing against people just as smart as me. So I did pretty badly.
I did demonstrate strong research aptitude in my project, as well as a bunch of other classes. I kinda skipped a bunch of stuff in second year, and second year was 33% of the final grade, so I did pretty crap.
To be fair, I came to the department with a proposal, found my own supervisors and got my own funding (through a government scholarship), so I didn't really cost them much.