I’m sure that was part of the motivation, but it was taught to me as “readers often stop reading after one or two grafs, so put the most important information up front.”
It ends up working so that both pressures apply the same way: reverse pyramid organizes information so busy/distracted readers should get the most salient bits, and also lets editors cut the less important details for space. Whether this worked out, I think, was pretty dependent on the journalist and publication, but “most important” is usually a bit subjective so that’s to be expected.
Almost everyone who reads your stuff online is busy/distracted, because they're online. They may have 40 tabs open. You have to give them a reason to be interested in your tab, fast. If you don't give it to them in... 7 seconds? 5? 3? Then they're gone. They close your tab and move on to the next one.
They're probably not even reading your first paragraph. They're skimming it. They might skim the second. You want them to actually read your article? Give them a reason in that first paragraph. Give them more reason in the second. Keep giving it to them, paragraph by paragraph. If you don't, they're gone.
This style of journalism predated “online” by decades or longer.
Even then people skimmed print newspapers. It’s why they were in columns and grafs were short (often one sentence). All of that was designed to make articles easy to skim.
And yes, distraction/boredom was part of it but so was a lack of time for most readers. A lot of news was read over a short breakfast before going to work. A lot of conventions were designed to make it easy to get a quick and broad overview of what the editor thought was important: pyramid style, short blips before “continued on page 11”, putting important things above the fold, etc.
It’s interesting which of those aspects translate well to online journalism and which don’t.
It ends up working so that both pressures apply the same way: reverse pyramid organizes information so busy/distracted readers should get the most salient bits, and also lets editors cut the less important details for space. Whether this worked out, I think, was pretty dependent on the journalist and publication, but “most important” is usually a bit subjective so that’s to be expected.