Income tax laws vary by state, but it's fairly common for the state where you're employed to want income tax (in states that have income tax) regardless of where you live. In your case, it sounds like you're employed in NYC. (That's how I interpreted your comment about being a "remote" worker.) The fact that you live elsewhere probably isn't relevant. Maine may also want to collect income tax since you're a resident there. (I didn't check to see if Maine is a state with an income tax.)
It's also pretty common for bordering states to have some reciprocity agreement so that people living and working on opposite sides of the border don't get hassled with tax on both sides, but there's nothing about being in the US that makes that automatic. Each pair of states can choose to have or not to have such an agreement. Since NY and ME don't border, it's less likely that they'll have such an agreement, but, again, I didn't check for that specific pair.
Also, it's common (but not necessarily true) that states give some credit for income tax paid in other states, so you might benefit there.
From the employer's side, if they don't have an office in Maine, they probably are not obligated to withhold ME state income tax. If you're a one-of-a-kind working in ME, then it's also probably not worth it to them to do so voluntarily since they would need to open an account with the ME state government and potentially start paying other types of fees and taxes there. If you're the only one, then and your official place of employment is NYC, then it wouldn't be strange for them to make ME taxes entirely your problem.