This is an addendum to the answer by jkien, which is correct but perhaps a bit laconic in some respects.
(I'll expand on jkien's statement that coherence in this case primarily means that electrical energy and mechanical energy have identical units.)
The overall presentation largely comes from here, but the actual facts come mostly from here, here and here.
Introduction
One has to be careful when saying that the practical units (the volt, the ampere, etc.) were 'coherent with' the meter-kilogram-second (MKS) system.
On the one hand, if by 'MKS' we mean a purely three-dimensional mass-length-time system, i.e. what's called an absolute system, then the volt, the ampere, and the ohm were most definitely not coherent units in it.
For those new to the terminology, an absolute system of units is one in which even the purely electromagnetic quantities (such as the electric charge) have dimensions that are just powers of length, time, and mass. For example, in the Gaussian system of units, which is an absolute system, the Coulomb law in vacuum has the form F = q1 q2 / r2, from which it follows that the electric charge has the dimensions of length × √force = length3/2 mass1/2 time-1 (see here).
Indeed, as we will show below, there is exactly one absolute system in which the practical units are coherent: the one in which the base unit of length is 107 meters, the base unit of mass is 10-11 grams, and the base unit of time is the second. This was called the quadrant-eleventh-gram-second (QES) system: 107 meters was called a quadrant, as it is very nearly one half of a meridian of the Earth); and 10-11 grams was called an eleventh-gram, following a terminology invented by George Stoney (see the last paragraph of this page). Needless to say, the QES system (which was originally worked out by Maxwell; see here, p. 207) never saw any practical use.
On the other hand, if by 'MKS' we really mean a four-dimensional, MKSX system, where 'X' is the unit of some electric quantity,1 then it is incorrect to say that it is an accident that the electrical units of volt, the ampere, the ohm, etc.. were coherent units in such a system. Of course they were, since one of them was chosen to be a base unit!
1Serious consideration was given to proposals where X was either the ohm, or the volt, or the ampere, or the coulomb. Eventually, metrological considerations turned out to favor the ampere.
What really was a coincidence was this: whenever the practical units (i.e. the ohm, the volt, the ampere…) are combined in such a way that the result is a purely mechanical unit, it so happened that these purely mechanical units were always coherent in the MKS.
A moment's thought will show that if one of these purely mechanical units is coherent in the MKS, then all of them have to be coherent in the MKS, because they are all coherent with each other.
For example, volt × ampere is a unit of power, named the watt. (The name was originally proposed in 1882, and by 1894 it had become a legal unit of electrical power in the U.S..) And the watt, purely by accident, turned out to be coherent in the MKS system.
(However, I will argue in the final section that it is not quite an accident that the unit of power that is part of a practical system of units should turn out to be coherent in some acceptable length-mass-time system. By 'acceptable', I mean a system in which (i) the base units of length and mass are decimal multiples of the meter and the gram, and (ii) are of reasonable sizes for practical applications.)
To put it another way, from the perspective of an MKSX system: what is an accident is that, in an MKSX system, the equation P = V I is valid as is, without any numerical prefactor in front of V I (where P is power in MKS units of mechanical power, i.e. kg × meter2/second3, V is in volts, and I is in amperes). For example, if one attempted to build a CGSX system (CGS = centimeter-gram-second), then one would have to write P = 107 V I.
Discussion
First of all, contrary to what one might expect, the fact that the reference standards of the metric system were the prototype meter and the prototype kilogram (rather than e.g. a prototype gram and a prototype centimeter) played no role in the decision to switch to a meter-kilogram-second system—just like that fact played no role in the previous (1873) decision of the British Association for the Advancement of Science (BAAS) to have the centimeter and the gram be the base units. (What the BAAS cared much more about was that the density of water in the cgs system is nearly unity.) In general, the question of the magnitude of the base units is independent of the question of the sizes of the reference standards. A striking example of this independence occurs in the U.S. customary system and the imperial system: since 1959, the yard and the pound have been officially defined in terms of the meter and the kilogram. Thus, these non-metric systems became based on the exact same reference standards as the metric system. And of course, and perhaps even more strikingly, the contemporary metric system doesn't use any (primary) reference standards at all.
Now onto what did matter. At the time the 'practical' electric units were adopted (1873–1893), everyone as a matter of course assumed that a scientific system of units should be absolute, meaning that the base dimensions should be just the three mechanical ones: length, mass, and time. The physics of the period used two absolute systems for electromagnetism, both of which used the centimeter, the gram, and the second (cgs) as base units: the electromagnetic system (emu) and the electrostatic system (esu). (Their names reflect whether it is the Coulomb law or Ampere's law which should be as simple as possible, i.e. without any dimensionful prefactors; see here.) The unit of electric charge, for example, is cm3/2 g1/2 s-1 in esu and cm1/2 g1/2 in emu. (The ratio of these two units has the dimensions of speed; indeed, the ratio of the esu and emu units of charge is c, the speed of light.)
The problem was that when it came to units of electric and magnetic quantities, both the emu and the esu units had sizes that were either much too large or much too small for practical use. Therefore, in 1873, the decision was made to introduce a 'practical' system of electric units, defined by multiplying the corresponding emu units by some suitable power of 10 so that the result is of practical size. In particular, the practical unit of electric potential, the volt, was defined to be 108 emu units, while the practical unit of current, the ampere, was defined to be 0.1 emu units.
The following is somewhat tangential to our discussion, but, for completeness: a further complication was that the emu units were difficult to measure, so one also needed to introduce practical realizations of the practical units. The units so defined were ultimately called international units, and these became legal units in several countries, including the US. As it happened, this way of defining units was unfortunate and introduced further problems, one of which was that one was eventually able to measure the discrepancy between the international and practical units. For example, it turned out that 1 international volt = 1.00034 volts; see here.
Now, there is indeed an absolute (i.e. a three-dimensional, length-mass-time) system is which the practical units are coherent, but it is not the meter-kilogram-second system. It is, rather, a system in which the base unit of length is 107 meters (called a quadrant, as it is very nearly one half of a meridian of the Earth), and the base unit of mass is 10-11 grams (an eleventh-gram): the quadrant-eleventh-gram-second (QES) system.
This can be derived from the following facts. As we said, the practical units were defined as decimal multiples and submultiples of the emu units. It will be convenient to have short names for the emu units of potential, current, and charge; let us use the abvolt (as in, 'absolute volt'), the abampere ('absolute ampere'), and the abcoulomb ('absolute coulomb'). (Historically, these names didn't appear until 1903; until then, one just used the terms the emu unit of potential, the emu unit of current, etc.) When expressed in the base cgs units, the abvolt is g1/2cm3/2/s2, the abampere is g1/2cm1/2/s, and the abcoulomb is g1/2cm1/2 (see here, here, and here). On the other hand, the volt was defined as 108 abvolts, the ampere as 0.1 abamperes, and the coulomb as 0.1 abcoulombs (see the same three links). Now imagine we change the base units of length, mass, and time by factors of M, L, and T, respectively. Then the base unit of potential will become (M g)1/2(L cm)3/2/(T s)2 = M1/2L3/2/T2 × g1/2cm3/2/s2 = M1/2L3/2/T2 abvolts. We want this new unit to be the volt, so we must have M1/2L3/2/T2 = 108. Similarly, if we want the new unit for current to be the ampere, we obtain that M1/2L1/2/T = 0.1, and if we want the new unit of charge to be the coulomb, we obtain that M1/2L1/2 = 0.1. We thus have a system of three equations with three unknowns. The solution is L = 109 (so the base unit of length should be 109 cm = 107 m), M = 10-11 (so the base unit of mass should be 10-11 g), and T = 1 (so the second remains the base unit of time).
The way the meter-kilogram-second (MKS) system enters the story is this. In addition to the electric and magnetic units such as the ohm, the volt, the ampere, etc., the practical system of units also had to include some purely mechanical units. This is because of relations such as voltage × current = power. In particular, the volt times the ampere gives a unit of power, which was in 1882 given a special name: the watt. Then the watt times the second gives a unit of energy, which was named the joule. Of course, these purely mechanical practical units were coherent in the QES system. However, they are in fact coherent in a whole family of systems. To see why that is so, recall that the dimensions of power are ML2/T3. It follows that if the watt is coherent in a system, it will also be coherent in any system obtained from the original system by simultaneously changing the base unit of length by a factor of L and the base unit of mass by a factor of M in such a way that ML2=1, i.e. in such a way that M=L-2. We are told that the watt is coherent in the QES system; thus, it will also be coherent in any system in which the base unit of length is L × 107 meters while the base unit of mass is L-2 × 10-11 grams. Picking L = 10-7 gives the meter and the kilogram.
Moreover, it is easy to check that, if we insist that the new base units should be decimal multiples or submultiples of the meter and the gram, then the choice L = 10-7 is the only choice that produces base units of practical sizes. For example, if we pick the next larger L, i.e. L = 10-6, then we run into problems with the base unit of length: it would be 10 m, which is already impractically large, and would become even larger if L is larger. On the other hand, if we pick the next smaller L, i.e. L = 10-8, then we run into problems with the base unit of mass: it would be 1016 × 10-11 grams
= 105 grams = 100 kg, which is impractically large, and will be even larger if L is even smaller. That leaves us with L = 10-7 as the only sensible choice.
Probably many people noticed that the watt is coherent in the meter-kilogram-second system, but it was Giovanni Giorgi who really took note of it. He had the further insight—which was sort of iconoclastic at the time—that while the purely electric and magnetic units cannot be made coherent in the three-dimensional (absolute) meter-kilogram-second system, they could be made coherent in a four-dimensional extension of that system. Thus he proposed, in 1901, to introduce a fourth base dimension, which would be purely electric or magnetic. In principle, this fourth independent dimension could be any electromagnetic quantity, but only four received serious consideration: electric charge, electric current, electric resistance, and electric potential. Eventually, electric current was chosen because it was most advantageous metrologically. Another selling point of Giorgi's system was that it made it possible to rationalize (i.e. remove the awkward factors of 4π from) Maxwell's equations without a corresponding redefinition of units by factors of (4π)1/2 (which is what happens when the Gaussian system is rationalized, giving the Lorentz-Heaviside system).
The Giorgi proposal (with the ampere as the fourth base unit) was adopted by the International Electrotechnical Commission in 1935 and by the CGPM in 1946. Finally, when CGPM formally defined and established the SI in 1960, the Giorgi proposal was firmly embedded in it—indeed, the SI was very nearly named the Giorgi system.
Summary
The fact that the kilogram rather than the gram is the base unit of mass in the SI is all the more remarkable given that, for about a century, the scientific community had been almost universally using the centimeter-gram-second system. Let me summarize the main reason why the CGS was abandoned and the meter-kilogram-second (MKS) was adopted. The main background facts to be aware of are that (a) by the end of the 19th century, the so-called 'practical system' of electric units had become nearly universaly accepted in practical applications of electricity such as telegraphy, and (b) this system of units included the volt and the ampere, and therefore also their product; but this product is a purely mechanical unit (of power), and if one multiplies that by the second, one gets another purely mechanical unit (of energy). In 1882, these two units were named, respectively, the watt and the joule. Now: the MKS is the unique system which has all three of the following characteristics (and which keeps the second as a unit of time): 1. the watt and the joule are coherent, 2. the base units of length and mass are decimal multiples of the meter and the gram (so that the system is 'properly metric'), and 3. the sizes of the base units of length and mass are convenient (more or less) for practical work. All this assumes that the second remains the base unit of time; but it is definitely true that any proposal to replace the second would have been dismissed out of hand. The non-mechanical units such as the volt, the ampere, etc. are not coherent in a three-dimensional MKS system, which is why a fourth independent dimension was added: the ampere became a new base unit, dimensionally independent from the meter, the kilogram, and the second.
Alternate history
What if the practical units had been chosen differently? Would there still have been a way for a Giorgi-type proposal to work?
I think so, assuming some reasonable constraints on the possible choices.
I will assume that the practical unit of voltage could have been chosen as much as a factor of 1000 smaller than it actually was, i.e. it could have been anything between 105 abV and 108 abV, in decimal steps. (In other words, it could have been any of what we in our actual timeline call 1 mV, 10 mV, 100 mV, or 1 V. Of course, within the alternate timelines, the name volt would have a different meaning: it would refer to whatever unit was chosen as the practical unit.) Similarly, I'll assume that the practical unit of current could have been as much as a factor of 1000 smaller than it actually was, so anything between 10-4 abA and 10-1 abA. (In other words, it could have been any of 1 mA, 10 mA, 100 mA, or 1 A.) This gives 4 × 4 = 16 possible combinations. For each combination, the product of the chosen practical unit of potential and the chosen practical unit of current gives a practical unit of power. (For example, if the choices were 10 mV and 100 mA, then the practical unit of power is (0.01 V) (0.1 A) = 0.001 W.) For each such practical unit of power, one determines what would the base units of length and mass have to be in order for that unit of power to be coherent. As usual, we restrict ourselves to base units that are decimal multiples or submultiples of the meter and the gram, and that are of convenient size. I will assume that the convenient sizes go (in decimal multiples) from 1 mm to 1 m for length, and from 1 g to 1 kg for mass. The answers are in the following table:
$\begin{array}{|c|c|c|c|c|}
\hline
_{\overset{\scriptstyle \text{pract. unit}}{\text{of current}}} \left.\middle\\\right. ^{\overset{\scriptstyle \text{pract. unit}}{\text{of potential}}} & 10^{5}\,\text{abV}&10^{6}\,\text{abV}&10^{7}\,\text{abV}&10^{8}\,\text{abV} \\
\hline
10^{-4}\,\text{abA} & \substack{1\,\text{cm},\,10\,\text{g}}&
\substack{1\,\text{cm},\,100\,\text{g}\\
10\,\text{cm},\,1\,\text{g}}
& \substack{1\,\text{cm},\,1\,\text{kg}\\ 10\,\text{cm},\,10\,\text{g}} & \substack{10\,\text{cm},\,100\,\text{g}\\ 1\,\text{m},\,1\,\text{g}}\\
\hline
10^{-3}\,\text{abA} & \substack{1\,\text{cm},\,100\,\text{g}\\ 10\,\text{cm},\,1\,\text{g}} & \substack{1\,\text{cm},\,1\,\text{kg}\\ 10\,\text{cm},\,10\,\text{g}} & \substack{10\,\text{cm},\,100\,\text{g}\\ 1\,\text{m},\,1\,\text{g}} & \substack{10\,\text{cm},\,1\,\text{kg}\\ 1\,\text{m},\,10\,\text{g}} \\
\hline
10^{-2}\,\text{abA} & \substack{1\,\text{cm},\,1\,\text{kg}\\ 10\,\text{cm},\,10\,\text{g}} & \substack{10\,\text{cm},\,100\,\text{g}\\ 1\,\text{m},\,1\,\text{g}} & \substack{10\,\text{cm},\,1\,\text{kg}\\ 1\,\text{m},\,10\,\text{g}} & \substack{1\,\text{m},\,100\,\text{g}} \\
\hline
10^{-1}\,\text{abA} &\substack{10\,\text{cm},\,100\,\text{g}\\ 1\,\text{m},\,1\,\text{g}} & \substack{10\,\text{cm},\,1\,\text{kg}\\ 1\,\text{m},\,10\,\text{g}} & \substack{1\,\text{m},\,100\,\text{g}}& \substack{1\,\text{m},\,1\,\text{kg}} \\
\hline
\end{array}$
So, for example, if the practical unit of potential had been chosen as 106 abV and the practical unit of current as 10-3 abA, then the base units could be either 1 cm, 1 kg, or else 10 cm, 10 g. The main point is that, as the table shows, suitable choices of base units exist for any combination of choices of practical units of potential and current.
On the other hand, if we allow the practical unit of potential to be larger, e.g. 109 abV (i.e. 10 V), and if the practical unit of current is chosen as 10-1 abA, then no suitable base units of length and mass exist in which the practical unit of power would be coherent. (Unless we decide that either 10 m or 10 kg is acceptable as a base unit after all; in that case, suitable choices would be either 1 m, 10 kg, or else 10 m, 100 g.) Similar problems appear if we allow the practical unit of current to be larger, e.g. 1 abA (i.e. 10 A).
What, precisely, was the lucky accident here?
At this point, we might be tempted to say that the lucky accident was that the sources of electromotive force that were available at the time, e.g. the Daniel cell, operated at about 1 V. If these sources had instead given voltages that were either much larger or much smaller, then the practical unit of voltage would have been chosen to be either much larger or much smaller than 108 abV, in which case the practical unit of power would likely have turned out to be not coherent in any system of units whose base units of length and mass have reasonable sizes. We have discussed this at some length in the previous section (Alternate history, see above), particularly in the last paragraph of it.
Following this line of reasoning, we would say that, more precisely, the lucky accident is that the voltages and currents produced by the devices of the day operated at values of (electrical) power that are comparable to one unit of (mechanical) power, where this unit of (mechanical) power corresponds to the base units of mass and length that are of sizes humans find practical. In other words: the lucky accident is that the power outputs of the then-technologically-achievable electrical devices turned out to have the same ballpark value as the then-technologically-achievable mechanical devices. And since the physics involved in the two types of processes is quite different, there was no 'cosmic' reason why they should result in comparable power outputs, so the fact that they do have comparable power outputs is a lucky accident.
On the other hand, if this coincidence of having comparable power outputs had not occurred, then probably one would not have been able to put the electrical devices to any practical use; and so there would have been no motivation to introduce practical units in the first place.
So perhaps as long as electricity can be put to practical use, any practical unit of electrical power must be of roughly the same order as any practical unit of mechanical power. And this should be enough to guarantee that it must be possible, using a Giorgi-type scheme, to bring together the practical electric and the practical mechanical units into one coherent system.