I wouldn’t go so far as to suggest that - a lot of people value an environment filled with people that have diverse academic interests. Anyway, both schools have top-notch science departments that are in the top-10 or top-15 for virtually all fields, and better than Princeton/Caltech etc. in several of them. Engineering departments might be lower ranked but that’s because they are smaller and focus on a few areas of excellence. I’d be hard pressed to find any difference in the careers of CS majors between those who go to Penn and those who go to Caltech for instance.