The raw water pump brings water into the motor, since it doesn't have a closed cooling system, like a car. A car uses a lot of air to cool, obviously and a boat doesn't have room for a radiator, so the ones that do have a closed cooling system have a heat exchanger, but even that won't keep the motor cool if the raw water can't cool it. If the impeller is bad, it won't move much water in, and that means the water that's in the motor will eventually boil, which happens at a lower temperature that if it had some kind of coolant like ethylene or propylene glycol, under pressure. With a good impeller, if the bearing is going bad, it will still work, but most times, the seals will fail and you or whoever works on the motor will notice water leaking from the pump, or the bearing will seize and cause the shaft to fail because of heat.
If the inspection noted that the pump needed to be replaced, yes, they should have discussed it before the job was "finished", but how that is addressed is up to the shop. If the customer sets an absolute limit on the amount being spent on service, some shops will just stop there, with no assumption that any additional work will be done. Some servicers use a sort of "rule of thumb" for this, where they will do additional work up to about 15% higher without calling the customer but above that, they make contact. The only down side is that the customer will be spending 15% more than they were expecting but one of the up sides is that if the customer needs the boat by a certain time but can't be contacted for approval, the boat will still be finished instead of having to wait for that approval.
If I had been working on the boat, anything that would have caused a mechanical failure would be discussed when the work order has been completed or the boat is picked up. If the customer would be picking the boat up after hours, they absolutely get a call and I don't rely on anyone to inform the person whose signature is on the work order.
"shouldn't they have told me not to run the boat until it was replaced?" Probably.
Should you have asked them if it could come to this, after reading that the pump needed to be replaced, on the work order? If a part needs to be replaced, you can't generally limp it along for very long, but someone who doesn't work on this kind of thing won't necessarily know that. OTOH, there's generally a place on the work order for the customer's signature, agreeing that the work has been done and another place for their initials, near a place for notes on additional work needed. I don't know what your work order shows, but the common ones have these and it's there to protect you and the shop from "he said- I said" situations.