The aforementioned situation is an example of checks and balances.
In the United States government, there are certain laws that ensure no one person/branch of government becomes too powerful. This is known as the system of checks and balances.
In the US, this system of checks and balances exists in the federal government between the legislative, executive, and judicial branches. The legislative branch (aka Congress) has the ability to make laws. However, the Supreme Court (judicial branch) has the ability to rule these laws unconstitutional. This would make these laws illegal in America. This type of check on the power of the legislative branch ensures that this part of the government does not develop laws that will violate the rights of citizens.