[W]hy did Boeing (and McDonnell Douglas) decide to use such a hazardous (and potentially dangerous from a military perspective) material?
Because it's not particularly hazardous and it's not very dangerous from a military perspective.
Uranium comes as a mixture of two major forms (called isotopes). Uranium-235 accounts for about 0.7% of the mix and is the isotope that supports nuclear chain reactions so is used in nuclear fuel and atomic bombs. (Actually, almost all nuclear weapons since the bomb dropped on Hiroshima have used plutonium but that's a different story.) Almost all of the rest is Uranium-238, which is only mildly radioactive. It doesn't support nuclear chain reactions, so it can't be used in a bomb. Depleted uranium (DU) is uranium that has been processed to remove almost all of the Uranium-235. In other words, DU is almost entirely U-238.
U-238's radioactivity is mild in two senses. First, it has an extremely long half-life of about 4.5 billion years, which is about the age of the earth. Second, most of the radiation it emits is alpha particles. Alpha particles are trivial to stop with even the most negligible "shielding": a piece of paper or even a few centimetres of air is enough. Human skin is good shielding against alpha radiation: the particles are stopped by the outer layers of the skin, which are already dead, and which are shed in a few days anyway. You're not going to get skin cancer from low-intensity alpha-sources.
U-238 is only really hazardous to health if it gets inside your body. When that happens, it's bad for you in two ways. First, it's toxic in much the same way as any other heavy metal. Second, if it's inside your body, then the alpha particles it emits are hitting living cells of your body, rather than your dead skin, so now it can cause cancers. Inhaling dust is a big risk, here, and that's why soldiers who've worked with DU weaponry can have problems. In the case of the counterweights, this risk is mitigated by coating the DU so people aren't coming into contact with it.
The military implications are small. DU has two main military uses: nuclear weapons ("Waaaait, I thought you said it couldn't be used for that!") and non-nuclear weapons.
Because of its density and the fact that it burns vigorously when finely powdered and exposed to the air, DU is used in some anti-tank weapons. According to Wikipedia, the coalition used more than 1000 tons of DU-based non-nuclear weapons in Iraq in a three-week period in 2003. Each 747 contained between a third of a ton and half a ton of DU, which corresponds to about ten to fifteen minutes' worth of ammunition. That doesn't seem to be a big concern.
Application of DU to nuclear weapons is, like everything else in this answer, in two ways. First, it's used in the "tamper" of a nuclear weapon, which reflects neutrons back into the weapon's core and allows smaller weapons to be made. Second, you can put U-238 in the right kind of nuclear reactor and make the exact kind of plutonium that's used for bombs. However, neither of these is a big concern because any organization that's capable of turning DU into nuclear weapons must already have enough infrastructure that they will already have their own large supplies of DU and not need to pillage it from 747s. In particular, they must already have nuclear reactors to convert DU to plutonium and isotope separators to extract the plutonium.