Warranties are options for repair offered as part of a marketing plan. There are no requirements that products be sold with warranties, only that if a warranty is offered, it must meet the requirements of the Magnuson-Moss Warranty Act.

Most warranties are short, almost always less than 1 year duration, because accounting for sales revenue requires accounting for the possible cost of delivering the warranty service.  

So if a manufacturer sells a product for $1,000 and they estimate their cost to make an average warranty repair is $50, they have to reduce their revenue reporting by $50.  If they miss those projections, they may have to report a charge-off against revenue which always getting negative attention by financial analysts. 

Publicly held companies must make these reports public. It is no mystery to follow the accruals to determine how much warranties actual cost the manufacturer to provide. 

Extended warranties are sold separately as highly profitable services options.  These service plans have been generating profit margins in the 90% and higher level for decades.  In many cases the warranty uplift, upgrade, or service level agreement is the most profitable part of the transaction. The product sale is often a loss-leader in the same manner than printers are loss leaders for selling ink cartridges. 

Warranties are not any indication of durability, serviceability, or quality.  It is the goal of the manufacturer to make money.  The incentive for profits leads designers to select the least cost component that will survive the warranty period.  . 

Right to Repair will not alter any warranties but it will enable consumers to benefit from post-warranty service agreements or options at competitive pricing.