I don't think that the answers given here particularly answer the question.
Variables in mathematics can be thought of as things we don't know the value of. Or rather, they're placeholders. You use letters and symbols to denote arbitrary things. You're not tying them down to anything specific, they're there to mark some general relationship or formula, or to be an arbitrary element needed in proof, the specific value of which can be replaced with anything reasonable if you ever need to flesh what is proven out in a specific setting.
Over the many years, specific symbols have come about to denote specific variables in specific contexts. For example, it is common to use x to refer to an unknown real number in an equarion or a function, amd z for the same role with complex numbers. You would use n or k for natural numbers, p/q to denote a rational number, epsilon or delta to denote real numbers in epsilon-delta limit proofs, lambda to talk about eigenvalues, v to talk about vectors, R to talk about rings, m or mu to talk about measures, f or g or phi to talk about functions, P to talk about probability functions, d to talk about metrics, tau to talk about a topology, G to talk about a group, theta to talk about an angle, capital letters to talk about matrices, etc (that should be enough examples).
There are many examples like this were specific symbols are used in specific contexts. Why is this? The answer is extremely simple and most likely underwhelming. Convention. When people first started talking about certain things, they wrote them in a certain way. The people who wrote about these things afterwards would sometimes use the same symbols, and sometimes they wouldn't. But over time, the symbols people used to denote certain things would solidify, and a standard would emerge. It is never by conscious choice (except when attempts are made not to re-use symbols which are already common in related fields, such as why engineers often denote the imaginary number as j instead of i), but instead is something that naturally emerges through time.
There's nothing to stop you from using your own symbols to denote certain variables as long as you're clear, but since we already have a history (which ca,e about by chance) of writing certain things using certain symbols, it can often help readers to understand what you mean if you use the symbols as they would expect them to be used, even though (or because) that's the only reason they're used.