W2 vs 1099-NEC

My company switched me from a W2 employee to a 1099NEC contractor as I do not follow a routine/schedule. (I could work weekends, evenings, or sometimes not at all. I can work remotely or in the office but I do not have to "punch a clock.") Can you explain the difference and why the company would switch my employment status?