This is a method set up by the IRS in order to determine your residency status for tax purposes.
You are a resident, for US federal tax purposes, if you are a lawful permanent resident of the United States at any time during the calendar year. This is known as the "green card" test.