I do believe there was a requirement at one time that people attend their local parish.This rule is no longer in place.In our case,our local parish church is a large building that,like most modern Catholic churches,could easily be any protestant church.I know it is a church-but it seems like one should be watching a basketball game there.There is no sense of holiness.Our local church is less then 2 miles away.We attend the next closest church for 2 reasons.First,we have sons that live in that area (18 miles away) and it alows us to attend mass with family (sons,daughters-in-laws,grandchildren).This is a small,rural church that is a very traditional church building and just feels like a holy place.Also,we are plain-catholics and have others similar to us there.The priest is also very kindly disposed towards plain-catholics.
I remember reading about that change. It was in the 1917 code.
There are certain rights that Catholics have that the proper pastor is required to provide. Some permissions must be obtained from the proper pastor and proper ordinary. The proper pastor is usually based upon territory, but a Catholic could be a member of a personal ordinariate or personal parish instead.
CIC has the following (similar in CCEO):
Can. 102 §1 Domicile is acquired by residence in the territory of a parish, or at least of a diocese, which is either linked to the intention of remaining there permanently if nothing should occasion its withdrawal, or in fact protracted for a full five years.
§2 Quasi-domicile is acquired by residence in the territory of a parish, or at least of a diocese, which is either linked to the intention of remaining there for three months if nothing should occasion its withdrawal, or in fact protracted for three months.
§3 Domicile or quasi-domicile in the territory of a parish is called parochial; in the territory of a diocese, even if not in a parish, it is called diocesan.
Can. 106 Domicile or quasi-domicile is lost by departure from the place with the intention of not returning, without prejudice to the provisions of can. 105.
Can. 107 §1 Both through domicile and through quasi-domicile everyone acquires his or her own parish priest and Ordinary.
§2 The proper parish priest or Ordinary of a vagus is the parish priest or Ordinary of the place where the vagus is actually residing.
§3 The proper parish priest of one who has only a diocesan domicile or quasi-domicile is the parish priest of the place where that person is actually residing.