Both gold and bitcoin are a variant of "proof of wasted energy" or more euphemistically "proof of work". Why that makes it valuable is beyond me, but it isn't really a new thing considering the historic value of gold being much more than its utility as a material.
The 'value' in them is that they demonstrate that energy is currently so cheap and abundant to Us that we can waste it frivolously.
It's a sort-of flex, showing off, a demonstration of (energy) wealth. Humanities's peacock feathers.