The term "warranty", in its common law meaning, is a contractual term whose breach does not automatically entitle the innocent party to terminate the entire contract. A special case of a contract is the sale of goods; probably every jurisdiction extensively regulates this type of contract. Consequently, a lot of "warranties" in this type of a contract are implied; some may be mandated by the law (e.g., warranty of title), others are implied by the law but the seller may opt out under certain conditions (e.g., warranty of merchantability). The seller may add also additional explicit warranties, so as to induce the customer to purchase, or to make the warranties implied by the law explicit, so as to reduce disputes.
Service contracts are normally marketed as "extended warranties". They extend the warranties included in the sale itself. This means that you are paying extra for the fact that the retailer will promise extra. They are separate contracts, rather than mere provisions of the sale of goods with which they were usually (but not always) negotiated together. Because they are not terms of the sale of goods, the contract law dichotomy of warranties versus conditions doesn't really apply to extended warranties; but if you insisted on applying it anyway, they would come out as pseudo-warranties, not as pseudo-conditions of the sale. So the term "extended warranty" shows no semantic shift at all, and the shorter term "warranty" (when applied to service contracts, presumably by non-lawyers talking to the general public) is a rather modest generalization of the original, legal meaning.
Legal English is just a small part of general usage of English. If enough people start calling service contracts "warranties", that becomes one of the meanings of the word. This meaning can then pose a small challenge to authors of legal terminology textbooks and they may be tempted to label a common English idiom as "incorrect"; however, that's just a propaedeutic device to allow them to explain the "correct" (i.e., legal) meaning instead.