The wildly popular app relies on algorithm-based customizing that’s helped glue users to their screens.