Sailing rigs were fairly common on steamships throughout the 19th Century. This was because of the flaws of steam machinery at the time. Especially in the early days of steam, it was highly inefficient. They consumed large amounts of coal at a high rate. In 1865, the Royal Navy ran a race between three of its frigates to test the 'compound engines' (engines which used two or more stages of steam expansion) that were now becoming available. Two of the ships, Arethusa and Octavia had 'simple engines', while the third, Constance, had a compound engine. The ships raced under steam from Plymouth to Madeira, a distance of about 1,200 nautical miles. None of the three would reach it under steam. Constance, operating with the most efficient engine, would run out of coal 30 NM short of the island, having burnt two tons of coal an hour over the 124 hours she had been steaming. The other two ships made little over 1,000 nautical miles under steam. The inefficiency of the engines combined poorly with the difficult logistical challenges posed by steam. With these high rates of coal consumption, most ships could not carry enough coal for long voyages with steam alone. This could be compensated for by stopping at coaling stations to refuel. However, maintaining coaling stations was a tricky task in its own right. Coal was rarely mined where ships needed to stop off to refuel. This meant that it had to be carried to where it was needed by colliers. Given the hunger for coal, this meant large fleets. In 1870, the P&O Line, which ran steamships from the UK to India, needed a fleet 170 sailing colliers to support its steamers. The challenges grew larger as you got further from the best coal mines. The Pacific, in particular, had few coaling stations, due to its vast size and the distance from the coal mines of the UK. Welsh coal was viewed as the best available, due to its high energy content, but it cost nearly 1.5 times as much in Singapore as it did in Gibraltar. These difficulties meant that most ships meant for long-distance travel had sails, as well as their steam engine. Sails would be meant for long voyages, while the steam engines would be used when the wind was low, or would be against a sailing ship (as well as for tactical use in the case of a naval vessel). Sails would remain surprisingly late, especially on ships intended for use in the Pacific. The RN's last class of ships built with sails were the Cadmus-class sloops of 1900-03, though they would have their sails removed after the loss of HMS Condor in a storm in 1901.
While there were real advantages to sails for much of the 19th Century, there were also significant disadvantages. Sails and masts were heavy, and, of course, were carried high in the ship. This meant significant topweight, which could make ships unstable. The loss of Condor, as already mentioned, was blamed on her sailing rig. Similarly, the loss of HMS Captain, a fully-rigged turret ship, in 1870, was the result of her sailing rig, exacerbated by the heavy weight of her turrets. Better design could mitigate these issues, but there were also performance effects. Masts and rigging imposed significant drag, and could slow down a steaming ship by up to 1.5 knots. Meanwhile, a sailing ship would experience drag from the fixed propellers of a steam engine. While ships could have movable propellers, which could be hoisted up into the ship when not in use, the aperture this left made steering harder. In addition, there were problems with the armament. Rigging and sails were highly flammable, and could be set on fire by the blast of a ship's armament. This could be avoided by carrying the guns on a separate deck, but this limited their field of fire. Ships without sails had real advantages, being faster, more stable, and better able to fight, but were limited in how far they could travel.
Over the course of the 19th Century, steam engines became more efficient. The introduction of fire-tube boilers, triple expansion engines, and ultimately, turbines (along with improvments to other aspects like condensers), reduced the coal consumption of engines. At the same time, the networks of coaling stations expanded to cover the whole world. The introduction of oil burning in the early 20th Century simplified things further, as oil had a much higher energy density than coal, and was easier to transport. With these improvements, steam ships could reach anywhere on the planet. This combined with the significant disadvantages of sails to make using steam alone much more attractive.