Bitcoin has value because of the following two reasons:
It is useful.
It is useful because it helps doing things with our money what we have never done before.
It is rare and limited.
It is limited because the protocol it is built which defines maximum cap of 21 million cap limit.
What does Bitcoin allows us?