For Madison, the main purpose of the system of checks and balances was to prevent the legislative branch from getting too much power.
Madison worried about the way in which the legislatures of states like Virginia and Pennsylvania had become too powerful. He worried that legislatures that had too much power would do things that were popular but that were, at the same time, bad for the country. For this reason, Madison wanted a system of checks and balances. He felt that such a system would prevent any branch from taking too much power from the others. He felt the legislature was the branch most likely to do this.