The base intuition that makes the discrepancy quite intuitive (to me) is that the shorter your total distance is, the greater is the harm to your average speed that wasting time causes you. This is because the longer your distance, the more you can amortize the harm of wasting time.
This is probably actually even clearer when using inverse units, hours per mile rather than miles per hour. In the bike race case, you have a time budget of 1/29th of an hour per mile, or over the whole 100 mile race, 100/29 hours (3.448 hours). But by the max speed rule, you are forced to spend at least 1/40th of an hour on each mile of the race, so 100/40 hours (2.5 hours) are already accounted for, leaving you with only 3.448 - 2.5 = 0.948 hours to spend as you wish.
In my simple example I had you spend that entire time at a standstill in the middle of the course. But you could equally well spend that time by taking some middle segment at some positive but lower than 40 mph speed so as to extend the total time by 0.948 hours. (Relative to going at max speed the whole time.) So long as you spend an extra 0.948 hours somewhere, that lowers the overall average to 29 mph, and so long as you spend them not closer than 61 km to either end of the track, that extra time is spent fully within any contiguous 100 km stretch. Amortizing that time over 100 km will necessarily result in a lower average speed than amortizing it over 100 miles—the question only is if it does so enough to lower the 100 km average below the world record threshold (which in this case it does.)
So long as you’re spending all that 0.948 hours in such a way that it’s included in all possible 100 km contiguous stretches, all your 100 km contiguous stretches will be equally bad: thus the slowest possible speed for the fastest 100 km segment is what I achieved above—24.835 mph.
Likewise, this “silly runner convention” of using the reciprocal speed, minutes per mile, makes the marathon case fairly simple. Run the full thing at max instantaneous speed, 20 mph, but stop at each mile marker for 5 minutes (8 - 3 = 5), and as each contiguous 1 mile interval, no matter where it starts, passes (no less than) one mile marker, this means that each contiguous mile takes (no less than) 8 minutes (three running, five waiting) as is required.
(Actually, as worded, the 7.5 mph average limit is exclusive—“slower than”, rather than “no faster than”. So imagine I said to wait for 5 + \varepsilon minutes. Note also that the inclusivity of the [x, x+1] intervals in which we must run slower than 7.5 mph means that actually some of the intervals will include two mile markers, one at each end, and thus will have an even lower average speed than most segments, but that’s allowed.)
Running a whole marathon at 20mph (three minutes a mile) takes 26.2 \cdot 3 = 78.6 minutes. Waiting around at 26 mile markers for 5 minutes apiece takes 26 \cdot 5 = 130 minutes. In total, that’s 208.6 minutes, or 7.962 minutes per mile; in other words, 208.6/60=3.477 hours, averaging 7.535 mph.
In fact, as in the bike race, while it’s easier to calculate when you always are either at max speed or a standstill, all that really matters is that you somehow waste 5 minutes each mile, above and beyond the mandatory 3 minutes, but no more. You could equally well alternate half-mile segments at 20 mph and at 4.615 mph, because then any given mile-long interval will include half a mile at each of those two speeds (even if it starts in the middle of one of the two, it will pick up what it missed during the next iteration of that segment), and thus the average speed in each such mile interval is 7.5 mph. Or you could alternate 0.2 mile segments at 20 mph and 0.8 mile segments at 6.486 mph. Intuitively, the way this works is that you can set it up so that both the first 0.2 miles of the race and the final 0.2 miles are fast, without counterbalancing that final fast segment with a following slow segment.
This also shows that the only reason you can beat 7.5 miles per hour overall is that a marathon is not an integer number of miles.