There is no legal risk for NASCAR. If they can arbitrarily limit a driver who meets certain criteria to five or seven events, they can arbitrarily limit the same criteria to zero. Being a Cup driver is not a protected class, there is no discrimination lawsuit to file.
Several professional racing series do not allow competitors in the top division to compete in lower developmental classes.
It's their choice. NASCAR has tightened the restrictions to the degree they want to, and can issue more limitations any time they choose to. If the drivers had a union like the team owners kinda do, that would change the equation somewhat. They don't.