It is a good question because textbooks do not discuss it. Scientific explanations are of two types, how and why. The "why" part of the explanation is very difficult to answer. Often we don't know the answer at a fundamental level. A simple example is that of what is universe is made? What is the origin of mass or charge? In the same way the electrode potential can also be understood at various levels. The most advanced discussion of electrode potentials can be done in terms of Fermi levels, but this is not my area of expertise. The macroscopic level discussion is that one can consider the electrode potential as a (thermodynamic) tendency of a substance to gain electrons. If you look up modern electrode reduction tables, all entries are listed as reduction process (all electrochemists agreed to do that after a long academic fight to write it this way). Hydrogen has been given an arbitrary value of 0.0000 V for the sake of comparison. You always need a reference in electrochemistry so electrochemists decided to use H2 electrode as a reference.
a) If you look at the table below, look at lithium entry: It shows that Li+ has very low (or negative electrode potential) tendency to gain electrons. Read it the other way (right to left), that Li metal has a very high tendency to become a lithium ion.
b) Look at the silver entry: It shows that Ag+ has a high tendency to gain electrons (positive electrode potential). Read it the other way (right to left) that Ag has a very low tendency to become Ag+.
If I make a galvanic cell consisting of two beakers connected by a salt bridge, having a lithium electrode in 1 M Li+ solution, and a silver electrode dipped in 1 M Ag+ ions. Connect the leads to an voltmeter.
Now Ag+ has a tendency to accept electrons and become Ag and lithium metal has the tendency to lose electrons and become Li+, what do you think happen? Electrons would feel a "pressure" or better "potential difference" causing them flow from higher potential to a lower potential, which is given by
Ecell= Ecathode - Eanode= 0.7996 - (-3.040) = + 3.8396 V, this should be your voltmeter readings. Why did we choose Ag+ /Ag as a cathode? Because Ag+ ions have a higher tendency to reduce than lithium ions.
In the same way you can choose Li and Be cell. What would be the cell voltage?
For example, electrode potential tables look like:
Li+(aq) + e− ⇌ Li(s) –3.040
Be2+(aq) + 2e− ⇌ Be(s) –1.99
Al3+(aq) + 3e− ⇌ Al(s) –1.676
2H+(aq) + 2e− ⇌ H2(g) 0.00
Ag+(aq) + e− ⇌ Ag(s) 0.7996
PbO2(s) + HSO4−(aq) + 3H+(aq) + 2e− ⇌ PbSO4(s) + 2H2O(l) +1.690
H2O2(aq) + 2H+(aq) + 2e− ⇌ 2H2O(l) +1.763
F2(g) + 2e−⇌ 2F−(aq) +2.87