I've heard that guns became common place in armies due to the fact that they were easy to train with. You taught a man how to reload and to shoot while with a bow it would take a very strong man as well as a lot of training to achieve the same thing effectively.
Early guns were very inaccurate and, while a huge demoraliser, must have had a very low kill count on a battlefield. Crossbows however must have been very well developed at this point as well as being a much more effective weapon.
My question is why did guns become the weapon of choice when crossbows I thought would have been just as easy to train people to use, cheaper to make, and more effective?
My question is why did guns become the weapon of choice when crossbows I thought would have been just as easy to train people to use, cheaper to make, and more effective?
Crossbows are simpler to use - there is no need to learn how to safely load the weapon with flammable gunpowder while having a burning length of match (the nitrate-impregnated cord used to fire the gun, whether by hand as in early guns, or using a matchlock).
However, they are not cheaper. While a simple low-power hand-spanned crossbow with a wooden prod is cheap and easy to make, it is also only a marginally effective military weapon. The competitor of the gun is a high-draw-weight mechanically-spanned (with a windlass or cranequin) crossbow with a steel or composite bow. In the period when both crossbows and guns were in military use, we have some data (early 16th century). James P. Ward, "Prices of Weapons and Munitions in Early Sixteenth Century Holland during the Guelder's War", J. EUR. ECON. HIST. 33, 585 (2004) gives prices for guns as mostly varying from 21 to 32.5 stuivers, typically about 24 stuivers. While, alas, no price for crossbows is given, a price for a windlass is given: 30 stuivers. So, a windlass alone is similar in price to a gun (on average, more), and a crossbow + a windlass together will be more expensive than a gun.
Also not easier to make. The cheaper high-power crossbows used steel prods (bows). These require good quality steel and skilled manufacture (especially the heat treatment), while a gun can be made with wrought iron. A crossbow could also use a composite prod, made with a laminate of horn, wood, and sinew-in-glue, but this would be more labour-intensive and more expensive than a steel prod.
A lightweight, moderately powerful, hunting crossbow, designed to be spanned with a cranequin, might weigh 3-4kg (without the cranequin) (an example of such a bow). While the crossbow is bulkier and harder to carry than a gun, a crossbow like this is lighter (e.g., an arquebus, often about 5kg). However, [a cranequin can add another 2kg to 3kg to the crossbowman's load, and makes the crossbow a less convenient weapon than a gun.
The heavy windlass-spanned crossbows are heavier still. Some examples: a bow at 6.5kg, with another 2kg for the windlass, a bow at 7.9 kg and windlass at 2.7kg, and a bow, without windlass, at 11.7kg.
As for effectiveness, the 16th century arquebus was not necessarily more effective against armour than the most powerful of crossbows (they delivered more energy, but a pointy crossbow bolt penetrates armour better than a lead bullet). A wound delivered by a gun could be more reliably incapacitating. At short ranges, both weapons will be similarly accurate in practical battlefield conditions. At longer ranges, the crossbow will be more accurate, as it won't suffer from the unpredictable trajectory of a randomly-spinning ball from a smoothbore barrel. However, with the introduction of the musket in the 16th century (essentially, a heavier, more powerful version of the arquebus), the gun gained a large advantage in anti-armour performance over the crossbow, due to a large increase in muzzle energy (compared to the arequebus).
The improvement in guns took time. That's why the gun didn't replace the crossbow overnight. Eventually, the gun was sufficiently better that the crossbow disappeared from the battlefield.
EDIT: One additional advantage of the gun in military use: A crossbow is more delicate, and more likely to get broken under battlefield conditions. An early gun is a simple metal tube, with minimal moving parts, and nothing with close tolerances. A crossbow trigger for a powerful crossbow is more complex, and needs better precision in manufacturing than, e.g., a matchlock trigger mechanism. Crossbow strings are susceptible to weather damage (and composite prods, too). An early gun, OTOH, is quite damage resistant (but keep your powder dry!).