Because local media is ad-dependent and the NYT makes most of its money on paid subscriptions. Media companies have been trying to pivot to paid subscriptions, but the NYT has for over a decade been premised on paid subscriptions online, during a time period where competing media companies hoped to stay free to subscribers based on ad revenue; they've managed to build a business that is essential enough that 8 million people subscribe to it, including during a long stretch of time where the modal media business strategy was "monetize eyeballs".