Of course there were long barreled smoothrifles. Just what do you consider " Long "?
As for why the smoothbore muskets? It had to do with battlefield tactics, which had not changed in 1000 years, from the days of pikes, swords, and bows and arrows. The Guns merely replaced the pike and bow and arrow. Mass ranks and files of men were still the order of the day. The military wanted volley fire at massed enemy troops who faced each other at no more than 50 yards. There is some argument that the reason there were no rear sights provided on the Brown Bess or Charlyville muskets was because the officers did not want to allow the men of lower rank( and class) to be able to take "Aim " at the enemy officers, because that was considered wrong. Without officers to control the men, any battle could deteriorate into chaos, and mass slaughter of the losing party, along with pillaging, Rape and murder of the townspeople nearby the battle fields. There were all kinds of " Rules of warfare" agreed upon by the aristocracies of Europe, to help civilize warfare. An inaccurate( relatively speaking)musket, without a rear sight, provided with undersized ball and modest powder charges tied into a paper or cloth cartridge, would allow repeated reloading of the musket during a battle, while volleys of musketballs would be sent towards the enemy lines, without risking officers who would be mounted on horseback well behind the battleline, trying to see what was happening through or over the clouds of smoke.
So, the reason that smoothbore muskets lasted as the main battle arm of the day for so long after the first rifled barrels were invented is a choice to conform the guns to " approved " battlefield tactics", rather than change tactics of war to fit the new arms. The European armies were simply not prepared to face unconventional warfare, and it showed in battles during the French and Indian War, here in N. America, and finally during the American Revolution. By 1815, when the Battle of New Orleans was fought at the end of the War of 1812, between Great Britain and the USA, the continued adherence to battlefield tactics and the smoothbore musket resulted in the death of so many British officers on the battle field, struck down by both cannonfire, and rifle fire, that the military forces in Europe had to begin to consider changing firearms, and adapting new battle tactics to make use of rifles. The transition to rifles, and new tactics evolved as the flintlock was replaced by the Percussion action, but open field tactics were really not retired by British officers until after the Crimean War.
In America, our officers were also being taught the battle line tactics, and volley fire was still the name of the game through the Mexican War of 1845-46, and through the early years of the Civil war. Not until Breechloading Rifles using powerful cartridges did we get the men down into trenches, or separate them on a battlefield to prevent volley fire from the enemy from killing so many soldiers at once.
The Little Big Horn Battlefield evidence( 1876) indicates that, while overwhelmed by vastly superior Native American forces, Custer's forces were formed in " skirmish " lines, with the men spaced 5 yards apart, to prevent deaths from volley fire. General Custer had earned his reputation as an agressive cavalry officer during the Civil War, but as one of the youngest men to every have the rank of General, he also believed in using better field tactics, that conserved his forces. He did so at the Bighorn, and his command probably survived much longer because of his tactics. The fact that the bodies, and evidence of battle were spread over a considerable distance, and not all clustered at the top of " Last Stand " hill indicates that this is true, contrary to some of the famous oil paintings of his " Last Stand ".
The Springfield Trapdoor single shot rifle, which was adopted in 1873 as the first cartridge rifle for the U.S. Armed forces, still had a full length stock, and a substantial bayonet, just like the Brown Bess, and Charlyville muskets. The old officers of the military still believed in the tactics of their youth, and believed that a charge of men armed with bayonets was still the best way to break up an enemy battle line. Repeating rifles were available by 1873, as were accurate rifles with scope sights, used effectively by "snipers" on both sides of the American Civil War. But, the Generals didn't want to introduce such "tactics " into general warfare because, like their predeceasors, they didn't want officers being singled out and killed on the battlefields. When smokeless powder became available in the 1890s, and was being used by European powers, including Spain, AMericans were forced to adopt a repeating arm that used smokeless powder, too. The .30-40 Krag Rifle replaced the Springfield, finally, but it too was provided with a substantial bayonet. You don't see the military getting away from the idea of bayonet charges until Vietnam( 1961-1975), and only recent rifles have been used that have no provision for a bayonet on them at all.
If you think the adoption of a rifled barrel and rear sights took a long time, the adoption of scope sights on battle field rifles has taken more than 150 years. The Scope sight showed up in the 1850s, and was well known during the 1860s. Even in WWI, only snipers were provided with rifles that had scope sights. The same with WWII, Korea, and Vietnam. In the Gulf War, night scopes, much more powerful, and reduced in size from what was first employed in Vietnam, became used by small units. During the Afghanistan, and Iraq wars, for the first time, infantry rifles are being provided with all kinds of optical sights, from ordinary rifle scopes, nite sights, laser sights, and C-More "red dot " aiming sights. When you occasionally see pictures of soldiers in combat on TV, keep an eye on the rifles they carry. Barrel lengths vary considerably. And the sights they have also vary from man to man. You see very few of the Vietnam era style iron sighted rifles being used today.