The Dahomeans were previously trade partners with European countries and very financially successful as a consequence of the slave trade. They were quite proud of their military tradition because it had worked so well keeping down its neighbors (in particular, defeating the Oyo), and had a set of preferred tactics and weapons--muskets and swords. And by empire standards, they had done pretty good--control most of modern Benin for 300 years, made successful trade connections with European powers, maintained their borders against competing kingdoms. It's a thing that happens a bunch in military history...people that have won for a long time get complacent and cocky.
The First Franco-Dahomean War was such a rout that the ruler immediately attempted to re-arm with modern German rifles and artillery, but the Second Franco-Dahomean War kicked off before the new material was integrated into doctrine.