In the 1950s, psychologist B.F. Skinner ran pigeons through a simple setup: peck a lever, sometimes get a food pellet. The twist was in the timing — some pigeons got a pellet every time they pecked, others got one on a fixed schedule, and a third group got pellets at random, unpredictable intervals.
That third group pecked the hardest, the most often, and kept pecking the longest after the food stopped coming entirely. Skinner called it a variable-ratio reinforcement schedule, and it remains one of the most replicated findings in behavioral psychology — it's the same mechanism slot machines are built on, and the reason a predictable reward is far less gripping than one you can't predict.
A phone that might have a like, a message, or nothing at all every time you unlock it is running a version of the same schedule — not because anyone coded it maliciously, but because unpredictable reward is simply the most behaviorally "sticky" pattern psychology has ever documented. Skinner's pigeons didn't know they were in an experiment. Neither do you, most of the time.