Because bitcoin is recognized as a kind of digital gold, allowing money transfers, cross-border transactions and settlement of valuable exchanges quickly. In some countries, bitcoin provides an “escape” for citizens concerned about financial instability.
Knowing that what you say is correct but on the government list, bitcoin is becoming an unused product, maybe some countries are accepting it but compared with many countries denying, it is not a significant number and can reverse this denial, so bitcoin's value didn't come from recognition when the government didn't consider it legal. Perhaps trust created demand in bitcoin, regardless of the characteristics and origin of bitcoin, we still buy without knowing too much more information.