These services were also completely free without advertising at the time of the start of twitter / facebook / youtube. A lot of money can now be earned with this because it concerns such a large group of users.
But even without income, it is ultimately kept up because it has a large group of users.
People are creative and can also let something continue to exist through passion and effort without the influence of money.
Also the sun does not rise for free:
The end: stars like the Sun.
Life cycle of the Sun.
With stars between 0.5 and 8 times the mass of the sun, the core of the star starts to shrink when there is no longer the energy of the nuclear fusion to stop it. The fusion of hydrogen to helium moves to a shell around the burned-out helium core. A lot of energy is released, and the star starts to shine brighter. The outer layers of the star gradually swell and the star becomes a red giant. This period lasts approximately two billion years for the sun. At the end of that period, the star will have a centerline that is approximately as large as the orbit of the Earth. The surface temperature has then dropped to 2700 Kelvin (which has given the star a red color) and the star emits around 3000 times more energy than the sun now.
The contraction of the helium core and the expansion of the star as a whole suddenly stop when the temperature (100 million kelvin) and density (1000 kg / cm³) in the core have become large enough to allow the conversion of helium to carbon by means of the triple alpha process. The star then comes again in a quieter period, with carbon and subsequently oxygen being formed in new fusion processes. The energy released with these fusion reactions is ten times less than with hydrogen fusion. But a star like the sun shines at this stage about 50-100 times as bright as the current sun. This ‘waste’ means that the phase of helium fusion in the core is rather short: about 100 million years for the sun. Then the helium in the core is used up.
The helium fusion is now moving outside, to a shell around the core. In a shell, hydrogen ‘combustion’ is started even further outside.
The result is that the star returns to the region of the red giants, and to an area (the so-called AGB-branch = Asymptotic Giant Branch) where the star becomes a bit bigger, brighter and hotter than last time. However, this is a chaotic process. Because helium combustion is highly temperature-dependent, the star starts pulsing, and ultimately it is so unstable that the outer layers are completely blown away. These form a planetary nebula. The core that remains is initially very hot. He slowly shrinks and cools down. What remains is a white dwarf, where the exclusion principle of Pauli ensures that the star does not shrink any further. Only when the electrons disappear due to reverse beta decay and only neutrons remain, can the star decrease further in size. A white dwarf slowly turns into a black dwarf. A white dwarf consists for the most part of carbon, and one could regard it as a huge diamond, were it not for the fact that white dwarfs consist of degenerate matter, whereby there can no longer be a question of a crystal structure like in a diamond. Some white dwarfs have a mass that is close to the Chandrasekhar limit and if the star has an accompanying star it is possible that the white dwarf will take over mass from its double partner. If the limit of Chandrasekhar is exceeded, the white dwarf can explode into a type 1a supernova. Because the explosion always takes place at the same mass, these type 1a explosions are very similar and can be used as a standard candle to estimate intergalactic distances.