A point that hasn't been made is that raid results are going to be lopsided towards raiders in most cases regardless of results for a few reasons. The obvious one is that raiders generally pick their targets, which means that the presence of particularly strong villages or towns isn't always all that relevant, as those would be the places they don't generally attack (there are obvious exceptions here, such as the various attacks on Constantinople). Instead, you would usually see softer targets picked - in the late early to central middle ages, this meant Magyar attacks on central villages, Viking attacks that often focused on monasteries (which were often coastal, relatively poorly defended, and full of lucre), and general Mediterranean piracy and coastal attacks away from more militarized areas. Similarly, raiders generally have the advantage of surprise. This counts for quite a bit, to the point where forces that were generally technologically and numerically inferior would have had an advantage provided that the margins were small. Disorganized people not expecting an attack tend not to do the best defending against them for a lot of reasons - local numerical inferiority, the general uselessness of armor when you aren't actually wearing it, etc. Then, on top of this, there is the matter of where the "barbarians" were coming from and who they were. The Vikings had impressive metallurgy, high grade weapons, a decent amount of armor, and essentially unrivaled ships for most of the second age of invasions. The Magyar had high quality horses and generally better horse related technology, good bows, and effective raiding parties. Most of those pirates were coming from lands controlled by the Ummayad or Abbasid Caliphates, depending on period. These were regional superpowers that generally put the Byzantine empire to shame, let alone western Europe.

The point is this - even a lot of well armed, fairly well trained people could fall comparatively easily, due to the nature of raiding in general and the nature of the particular raiders. The presence of successful raids, massacres, etc. by no means indicates that the targets of them were incompetent, or that they would have much issue dealing with the raid on better terms (if, for instance, they were on the attack).