What’s the difference between stock Android and manufacturer-customized versions like One UI or MIUI?

How do stock Android and customized versions like One UI or MIUI differ in features and performance? Are there advantages to using one over the other? How do updates and bloatware compare?