The United States Constitution has been designed in such a way that it allows a kind of check and balance between the US government and the legislative arm of the federal government. The makers of the US Constitution gave the president the power to veto acts of Congress to prevent the legislative arm of the federal government from becoming too powerful.
When the Congress i.e the Senate and the house of representatives passed a bill and sent it to the president to sign it into law but the president decides to use his veto power not to sign it, what can the Congress do? Well, in this kind of scenario, the Congress just has to override the presidential veto by passing the act by a two-third vote both in the senate and the house of representatives.
This also has to do with majority vote. This Constitutional power of the congress is meant to prevent the president from any form of incessant rejection of their legislation or bills.