Typically being with residents is seen as better because you get a better feeling of what residency will be like and understand the daily flow of what you're supposed to be doing which includes things like how to present patients to groups and attendings, how to work-up a patient, how to properly write notes, as well as the general administrative procedures. Basically, it makes the learning curve smaller when you start residency and you'll be able to jump right into things faster and not be as much of a pain to the attendings and other residents when you start.
Personally, I think that's a little oversimplified and there are certainly advantages to being with a preceptor. For example, if you don't want to work in a hospital, especially an academic one, or want to having a private practice in a field like FM, then you're better off getting one on one/more personalized interactions with a preceptor. I'm with preceptors who rotated at hospitals with residents, all of them said they felt we were better off with preceptors and that the learning curve isn't an issue. I'd guess that some rotations, like IM, you'd definitely want to be with residents and it would be a disadvantage to your education not to rotate with residents.
Keep in mind, this is all just stuff I've heard from upperclassmen, residents, and physicians, so take it for what it's worth. I'm glad I'm with preceptors for third year, as I feel like the ones I've had do a far better job preparing me for shelves than rotating with residents who look at me as more of a hassle in their lives than someone to help. However, I'm definitely planning on doing most of my electives and especially my audition rotations at programs with residents so I don't miss out on anything and know what to expect in residency.