Because we believe it is the way to maximize individual happiness and that individuals are inherently valuable. To take an individual’s liberty is to violate something sacred that the person has just by being alive. You have to have a very strong justification, with a high bar.
This does come with tradeoffs, but I don’t think the masks and beach are part of that tradeoff. People can and will voluntarily take on inconvenience for the good of others, but they have to be convinced. Our dysfunctional president has actively fought against creating a consensus that we should move as one against this virus. When the US decides to do something together, especially in the modern era, we do it incredibly well mostly without sacrificing human rights (with some obvious historical injustices we have to remedy). What is happening here is a failure of leadership, not a failure of liberty.