Others have addressed why it matters (or doesn't matter) when viewed from outside mathematics. But within mathematics, unsolved problems usually matter for two reasons:
(1) When lots of really smart people spend lots of time trying to solve something, and fail to do so, it becomes even more interesting for other smart people. A well-known example is the Collatz Conjecture[0] which, by most accounts is a meaningless problem, but endlessly fascinates many for its renowned difficulty.
(2) In mathematics, you often stumble upon problems that are equivalent to other problems. If X is difficult to solve so you give up and go work on Y, only to find out that Y as a problem is basically the same to X, or they have some other intimate relationship, and it makes X that much more tantalizing. A common example for computer scientists is the whole class of NP complete problems[1] for which we don't know if there exists a polytime algorithm to decide. Every time we discover a new problem that lives in the realm of NP-complete, the P vs NP problem gets a little more tantalizing.
[0] https://en.wikipedia.org/wiki/Collatz_conjecture
[1] https://en.wikipedia.org/wiki/NP-completeness
(1) When lots of really smart people spend lots of time trying to solve something, and fail to do so, it becomes even more interesting for other smart people. A well-known example is the Collatz Conjecture[0] which, by most accounts is a meaningless problem, but endlessly fascinates many for its renowned difficulty.
(2) In mathematics, you often stumble upon problems that are equivalent to other problems. If X is difficult to solve so you give up and go work on Y, only to find out that Y as a problem is basically the same to X, or they have some other intimate relationship, and it makes X that much more tantalizing. A common example for computer scientists is the whole class of NP complete problems[1] for which we don't know if there exists a polytime algorithm to decide. Every time we discover a new problem that lives in the realm of NP-complete, the P vs NP problem gets a little more tantalizing.
[0] https://en.wikipedia.org/wiki/Collatz_conjecture
[1] https://en.wikipedia.org/wiki/NP-completeness