ByteDance interview question

Why and How Bagging and Boosting increase the robustness?