Why do we need to add a second to 30 June and risk upsetting Internet? We linked a physical constant (the time of one second) to a physical non constant (the rotation of the earth) so there will have to be adjustments - or not? Is it important that the UTC in one line on earth is the same as the astronomical time? As the earth slows down, it means that this line slowly changes position. When the line travels 1 hour away we can bring it back by an hour change if necessary. If currently we add 1 second say every 3 years, it would take thousands of years to change by 1 hour. The last time a second was added, in 2012, problems were caused in some systems. Why do we need to do it?
There's quite a few things here that need comments.

First off, the "linking" you describe was actually the first definition of the second (day, hour, and all the way down to second). Remember, since the dawn of civilization we've used celestial bodies to keep time for us.

The phenomena of the Sun and the Moon had good enough precision for all practical purposes until very recently. It was then that the definition of the time unit was rebased to a different phenomenon. BTW, the second of time is not a physical constant. It is a unit of measure currently defined as a multiple of the frequency coming out of the transitions of a certain atom between two different states.

Of course, the motion of the Earth follows its own clock, different from atomic phenomena, so it ought to drift off after a while. Do we "need" to make adjustments then? That's debatable. We still prefer to keep the Earth's clock and our clock in sync, and therefore we make adjustments when necessary. But is it needed in an absolute sense? No, not really. It's just convenient.

As to the risk of "upsetting the Internet", this is an alarmist rumor the likes of the "Y2K bug". I actually happen to work in a related field - I've done infrastructure at a variety of tech companies in the Silicon Valley; the NTP infrastructure (Network Time Protocol - what keeps Internet services in time sync) is something I'm very familiar with. A jump of 1 second should be and will be tolerated by essentially everything that's out there now.

Will there be stragglers here and there that will hiccup when the time takes a tiny leap? Yes. And that's a bug, the engineers need to look at the software and fix it. Remember, a lot of existing services (like Google Search, or Instagram) have servers and instances right now that are off by more than 1 second (just the way there are cars coming out of the assembly line with missing bolts once in a while), and usually nothing bad happens as long as the drift is not too big); fix NTP, the time base jumps on that instance, and again nothing bad happens in the vast majority of cases.

Relax, nothing important will be "upset". In fact, I doubt that the vast majority of people will be affected in any perceivable way.