No, it actually doesn't happen very often. Here's how it works for most production parts. Maybe 2-3 years prior to projected start-of-production ("SOP"), depending on whether the supplier is expected to provide design services in addition to part production, the OEM goes out to bid to a handful of qualified suppliers. The suppliers are given either a set of specifications (build to spec) or a design (build to print), an estimate of the life of production (say, 5-6 years for many light vehicles), and a volume requirement (but with no guarantee of volume). Most OEMs also ask for annual price reductions in exchange for a long-term agreement ("LTA"). The supplier needs to estimate not only the cost of producing the part, but the fixed costs associated with establishing production, such as design and engineering services, unique tooling like dies and molds (which the OEM will often reimburse but not always), and unique production equipment like automation. These fixed costs, to the extent not reimbursed in a lump sum, need to be recovered over the life of production on a per-piece basis. Also, the OEM-stated volume will represent a max capacity volume, and not a true estimate of the product's actual expected volume, so the supplier needs to estimate that as well, usually with the help of a third-party forecasting service.
Once the contract is awarded, the LTA generally promises the supplier the right to produce the part for the life of the product, subject to meeting the OEM's requirements for quality and delivery. The part goes into development and the production process is established. However, prior to actually producing and delivering a part that will go into a production vehicle, the supplier must prove that the part and the supplier's production process meets all of the specifications on a volume basis - that is, when the supplier's line is running at full speed. This approval process is called "PPAP" (production part approval process), and can be lengthy and arduous. After PPAP, the supplier can make zero changes to the part, process, or even lower tier suppliers without approval from the OEM and possibly another PPAP.
So once the part is in production, can an OEM change suppliers? Yes, but here's what will happen. The new supplier may need to acquire new production equipment and possibly new tooling. It will have to set up production and obtain PPAP against the original design and specs. These costs need to be passed along to the OEM. The original supplier will make a claim against the OEM for its own unamortized fixed costs. Because parts are delivered on a just-in-time basis, the OEM will need to ensure an orderly transition to avoid interrupting vehicle production. This usually involves building a bank of parts, which the original supplier may withhold pending resolution of any disputes relating to its early-termination claim. It is a decision that is fraught with cost and risk. The original supplier needs to be screwing up massively for this to happen. It will never happen over an opportunity for a small per-piece cost reduction. The OEM is much more likely to work with the existing supplier.
Parts can fail and be recalled for a myriad of reasons. I'd say that most often, for large recalls, there was a flaw in the design or spec from the beginning that didn't get caught until the vehicles had been in the field for years. Coincidentally, the fuel pump was just recalled on my 2018 BMW X5d. The reason is that bad diesel fuel in some parts of the world were causing corrosion to some of the components. Next most common for small recalls is that something temporarily went wrong with the production process - a 2nd or 3rd tier supplier changed something and didn't tell anyone, a machine went out of spec for a time before it was caught, a production worker failed to follow instructions, etc. It is also possible that a joint effort between the OEM and supplier to improve the cost of the part through VA/VE (value analysis/value engineering) resulted in a problem, which is kind of what you are implying, but again, this cannot happen without OEM approval.
If there was something significantly different about the changed part, like a new material, the changed part would have a new part number. This should be easy to track down if this is the case with the Mazda fuel pump recall.