Not necessarily. Making extra units to replace broken ones (or spare parts to replace broken parts) is typically more expensive than simply making units or parts more durable so it makes the two year mark.
Also, insurance companies are not non-profits. They take a cut as well. The factory already makes a profit, but that's not going to increase simply because they have to lawfully offer two years of warranty. They'll have more costs but it probably wouldn't affect the profit margin as much as an insurance company would.
Also, insurance companies are not non-profits. They take a cut as well. The factory already makes a profit, but that's not going to increase simply because they have to lawfully offer two years of warranty. They'll have more costs but it probably wouldn't affect the profit margin as much as an insurance company would.