There is no “right” or “wrong” answer to this question. The only advise I would give is if you are staying in academia and want to be a professor, you should have your degrees from different schools If you are staying in industry for your life’s work, a good school that is noted to be “tops” in certain subjects such as “aeronautical engineering” it is fine to stay in the same school.