I build my own desktop systems, and the individual parts usually carry 3 year warranties. Of course, by the time you are nearing the end of that, just purchasing an upgraded (faster) part makes more sense than hassling with a return.
However, with electronics, if an item is going to fail, it will usually do so within 90 days (usually less) of normal use. If an electronic part wasn't made right, it just won't work right, or the heat of functioning will cause it to fail in short order. Thus, long warranties on electronics are generally just peace of mind, and rarely matter much.
With guns, it is possible that there are defects in the metal castings themselves that may not become evident for some time. Instead of lasting for 50K+ rounds or more, a slide or frame may come apart after 5K rounds. If a gun is not going to function correctly, on the other hand, you are going to know that right quick- no more than 500 rounds. Metallurgy is better than it ever has been, and a reputable gunmaker should be eager to fix such problems, even if the "official" warranty is over.
When you buy something, use it, be it a gun, vehicle, or TV. That way you know if you are going to have problems sooner rather than later. Better to find that out within a month rather than wait and discover the problems 8 years later.