Facebook Inc. Chief Operating Officer Sheryl Sandberg defended the social network’s software algorithms, the programs that determine what content users see and don’t see, saying the system seeks to do more than simply show people posts they already agree with ideologically.