The term “grandfather clause” means something is exempt if in practice before a new law forbids it.
It comes from a legal trick used by the Southern States to keep former slaves from voting.
A law was introduced requiring the passing of a literacy test before anyone, black or white, could vote.
The only exemptions were people whose grandfathers had voted prior to the new law.
This gave all whites the right to vote, and virtually all blacks were disqualified.