Certainly not necessary. If you are a resident at UCLA then certainly you will have and edge at getting any fellowship at UCLA. But if you consider the total
number of fellowship positions at major programs, it exceeds the number of residents graduating.
Most fellowship programs look for the 'candidate' - LOR from program director (and how well connected he/she is) is most important. Do as many publications as you can. This will make you competitive for most prestigious fellowships.
I know of this guy from Univ of Nebraska who went to Mayo Clinic for Neuromuscular, a resident from Univ of Mississipi went to MGH for stroke/NICU, from Ohio State Univ went to CCF for epilepsy, UKansas went to Hopkins for NICU and many others.
So, most importantly, stay focussed and work hard during residency and do research and try to publish actively.