Climate is the distribution. Weather is a sample drawn from it.
That is the useful framing, because it makes clear that climate includes variance and extremes, not only the mean. A warming climate is a distribution shifting and changing shape, which is why record highs outpace record lows even though individual cold days still happen.
The thirty years is a convention, from the World Meteorological Organization, and chosen because it is long enough to average out interannual variability such as El Niño while short enough to stay relevant. It is not a physical constant, and other periods are used when the question calls for them.