The value "goes into" bitcoins,
although I think the current value of all bitcoins is a lot more than the significant cost of energy to compute the encoding.
The idea is that gold and diamonds are valuable because it takes a lot of work to get them. The fact that they are shiny, do not corrode or degrade with time also helps, because that allows them to be buried and hidden in time of trouble. And then with time, when the "easy" gold and diamonds have been found, it gets harder and harder, and that makes them more valuable.
The bitcoin protocol calls for the encoding criteria to be automatically re-adjusted to be harder and harder when more miners join in the fray.
The mining got quite tough long ago, hence people say "screw it", and start a new blockchain. Unlike gold and diamonds, it is not hard to say "let's start a new game where newcomers like us have a fresh shot at getting rich". Hence, more and more digital currencies are created.
And bits are fungible, while gold and diamonds are not fungible with other metals or stones.