The corporate world does not have as much loyalty as you may assume. In most cases, this means you can be fired -- or you can quit -- for almost any reason at all. Technically, you do not even need a reason. You can quit your job because you're bored or your boss can fire you because "it's just not working out."
This is because New York uses at-will employment. Keeping someone on or not is just a decision that an employer gets to make. Even things that seem unfair can result in firings.
For instance, maybe your boss always plays country music in the break room. You prefer pop music or classic rock, so you change the radio station. That could be it for you if your boss decides to fire you and find someone with a different taste in music. Yes, it seems unfair, but it would probably be legal.
Of course, this does not mean every firing is legal. There are protections saying you cannot be fired based on age, race, gender and the like. If you signed an employment contract, you cannot be fired in a manner that conflicts with the terms of that contract. If you are in a union, the union likely offers you some protections.
It is very important for employees and employers alike to know exactly when a person's job can be terminated and what steps have to be taken. At-will employment does mean that companies tend to have a lot of flexibility here, but do not make the mistake of assuming that it means all firings are legal.
Source: New York State Office of the Attorney General, "Can You Be Fired?," Eric Schneiderman, accessed April 26, 2018