Was there a specific weakness Rome’s enemies were exploiting?
So, to offer some context for those who may not know the terms:
Background
In the time of the early and middle republic, when Rome fought against its Italian neighbours, Pyrrhus, various groups of Gauls, and of course the Carthaginians, their legions operated in what we call the manipular system.
In this system, the legion was divided into three lines of heavy infantry, called hastati, principes and triarii, divided by age and experience and selected from citizens of sufficient property to afford their own weapons and armour, and supported by lightly armed velites skirmishers recruited from the young and the poor, and wealthy equites cavalry recruited from the very rich.
The infantry lines were divided into subunits called maniples, each with a paper strength of 120 men for the first two lines, 60 for the triarii, further subdivided in two centuries. (Of only 60 men in this period, though later a century would be 80 strong.) Each line would consist of 10 maniples, and the legion would deploy in its classic 3 line checkerboard formation. (Though the function of the gaps between the lines is subject to much debate.)
The thing is, as we get to later periods, our sources start to talk less and less about maniples. Instead, battles and operations are described in terms of cohorts. A cohort was a unit consisting of 6 centuries, or three maniples. Originally these would be 1 from each of the three lines of heavy infantry. Later, with the newer bigger centuries, a cohort would be 480 man paper strength. Around this time the light infantry also started disappearing, and all legionaries would serve as heavy infantry instead, which explains where those extra 20 men came from.
Examining the change
Traditionally, these changes have been attributed to the changes Gaius Marius made to the organisation of the Roman army, at the tail end of the 2nd century BC. These changes are then considered to complete the transition of the militia-army of the early-mid republic to the mostly professional one of the late republic, that would lead to the fully professional Imperial army we're all familiar with. Nowadays, not quite as much weight is given to the changes made by Marius himself, but the basic idea stands. I've written more on this topic.
On the changes to the manipular system, there are also some caveats to make:
Firstly, the manipular system didn't really disappear as such. As I said, the cohorts still consisted of 3 maniples of troops, and the maniple continued to be the basic administrative unit of the legion, even as the cohort became the tactical organisation of choice.
Secondly, the change was not abrupt. Cohorts are first mentioned by Polybius around the time of the 2nd Punic war, and some historians have tried to argue they were the de-facto tactical unit of the army even before the time of the late republic. This may be too strong a case to make (Goldsworthy is not convinced, for one) but either way there was no sudden and complete shift.
Explaining the change
To take your own question first: No, there was no weakness Rome's enemies were exploiting. The manipular legion performed just fine. Indeed, it was this force that set Rome on the road to dominating the Mediterranean and the one that defeated all of Rome's most powerful enemies. Much lauded though the later professional legions are, and impressive as they are in individual battles, they were almost always engaged in wars where Rome was the strongest power by far.
There was however an advantage to the cohort: it could operate independently as a tactical unit, because it consisted of all three types of infantry. Indeed, it may well be that this is why the cohort was created in the first place: we first hear them mentioned in the context of the war in Iberia, where small-scale guerilla warfare was the order of the day, and it may have been necessary to create independent sub-units of 3 maniples (plus presumably some light infantry) there to combat the threat.
There is also an argument going the other direction: As Rome's army evolved and professionalised, they abandoned their traditional cavalry and light infantry, as well as the divisions between the three lines of heavy infantry. From the 1st century onwards, all Roman legionaries fought as heavy infantrymen armed with short sword and pilum throwing spear. Therefore, there was no need to organise them in specific maniples anymore.
The cohort also facilitated command on the battlefield. Maniples had been commanded by two centurions, but there were 30 maniples to a single legion, which made it hard to give specific orders. Cohorts were capable of independent action and had a single commander, which simplified things a lot.
It is clear that the cohort structure offered greater tactical flexibility on the battlefield: besides the improved capacity for accepting orders, we also see changes in the way the legions can deploy. Where the militia legion had almost always deployed in the traditional triple battleline (triplex acies) the later legion could deploy in 2, 3, or even 4 lines, depending on the tactical situation. There was no need to put the Triarii in the third line in the back. Indeed, even more complicated stratagems were possible, such as Caesar concealing a fourth line of infantry behind his cavalry at the battle of Pharsalus.
However, I wouldn't say this greater flexibility was primarily caused by the cohort structure. Rather, it was the professionalisation of the army that enabled both such increased tactical prowess and did away with the need for the traditional manipular structure.
I should also add that even in late republic, the legions most often continued to deploy in the traditional triplex acies formation, and that when it comes to actual descriptions of battle, we don't see that much of a difference. All in all, I'd say that the manipular system worked fine, but it was designed for an older style of army, and the cohort system worked better. It was, however, an evolution in the way the army fought, not a revolution.
Sources:
Goldsworthy, Adrian, The Complete Roman Army, 2003.
Keppie, Lawrence, The Making of the Roman Army : From Republic to Empire, 1998.