Take it back to the same shop that installed it,they should stand behind it if it is a bad alternator and replace it, if they don’t never use that shop again.
Are you sure it is the bearings and not a loose belt? Can you/will you describe the noise it makes? Take it back to the shop where it was fixed. Just because they installed a lemon, doesn’t mean they knew about it. It may still be under warranty and/or the shop will replace it free of charge to you.
Depending on the car, the belt may be too tight on it and caused the bearing to go out. Some have a bolt tensioner that you could really crank on and throw the whole shaft out of alignment.
Some places also use reconditioned alternators, nothing wrong with them, but worth asking what kind of warranty comes on them.