Follow up: How did the Slavic tribes manage to resist the Byzantine Empire, one of the strongest at the time, and settle on their lands, keep their culture, language, and even assimilate the native population?
Good question! I'll start by answering why the Danubian frontier was so vulnerable, and then detail why the Roman position in the Balkans collapsed in the seventh century, allowing the Slavs and other powers to settle there.
The Strategic Geography of the Balkans
Eastern Roman provinces to the south of the Danube existed in a state of continual insecurity. The Danubian limes formed an incredibly long border. The border was situated near the end of the steppe corridor for nomads from Asia, and saw people continually moving to its north. The Thracian plains to the south of the Danube were highly vulnerable to attack from the steppe, particularly prone by land routes from the grasslands of west Ukraine. In 539, a group of invaders were even able to advance to the suburbs of Constantinople effectively unopposed. Nor were the mountain ranges south of the Danube a serious obstacle to invaders. The Balkan range, for example, rises gently upwards from the Danubian plain, only falling steeply on its south side. The area in-between the two formed Roman Lower Moesia; naturally suited to agriculture on account of the numerous rivers feeding it, and covered in fertile sediment, its wealth naturally attracted barbarian raids from north of the Danube. The north-south mountain passes from Lower Moesia to lands further south were many, and not easy to secure. It was therefore impossible to fully prevent raids across the Danube or neutralise the powers existing in the trans-Danubian world to the Roman empire's north. Goths in the fourth century, and Huns in the fifth, were able to cross the Danube and occupy/raid Roman-held Balkan lands. The vulnerability of Roman Balkan territories was recognised long before the sixth century; Polybius, in the 2nd century BC, claimed that "Thrace surrounds the territory of the Byzantines ... they are involved in an endless and troublesome war ... for it is not feasible to get rid once and for all of their hostilities".
This isn't to suggest that the entirety of Roman territory to the west of Constantinople was vulnerable of course; south of the Balkans proper, the littoral Illyrian coastline and mainland Greece were relatively more secure. They were isolated due to the mountain passes and ravines which separated them from the Balkans, but economically remote from Balkan trade and urban areas were largely focused on the Aegean and Mediterranean economy.
Defensive Measures in the Sixth Century
There were three major lines of defence in the sixth-century Balkans.
From Anastasius (491-518), a military presence was maintained along the southern bank of the Danube, with a limited naval presence on the river itself. Outposts were held to the north as well, serving as listening posts to the steppe world and aiming to follow the movements of tribes.
Procopius' Buildings describes in detail the second two lines of defence, both assembled under Justinian (527-565). The north-south Balkan mountain passes were fortified, seeking to protect southern provinces from enemies crossing the Danube.
Second, cities in the north Balkan zone, south of the Danube, were fortified, and the road network fortified as well.
Justinian's defence plans were thus based on the (entirely justified) assumption that the Danubian limes were still vulnerable. On top of these defensive measures, imperial authorities attempted to deter raids into the Balkans by encouraging locals to avoid displays of wealth. But the Eastern Roman defence for the Balkans was not just in terms of fortifications. It also, crucially, involved diplomacy. Roman emperors continually aimed to maintain a balance of powerlessness amongst these nomadic powers resident to the north of the Danube. Eastern Roman Crimea served as a crucial outpost for enabling this traditional "divide and rule" policy on the steppe, and through bribes and diplomatic intervention the Romans sought to deter and prevent attacks on the Balkans. The collapse of this policy is crucial to understanding your follow-up question.
The Sixth Century: Threats to the Balkans
Slavs only emerged on the Danubian frontier in the sixth century, and had no formal political centre. They were, therefore, difficult to confront militarily, and able to raid across the Danube in small groups. My previous paras should have suggested why this was so easy. But onto your follow-up question: Why were tribes so easily able to resist the Eastern Romans and even settle in the Balkans?
There is reasonable evidence to suggest that Justinian's programme of fortification and diplomacy did deter Hunnic and Slavic raids. From 551-578, a reasonably well-documented period for other Balkan events, not a single Slavic raid was recorded (excluding one particularly harsh Kotrigur invasion in 558). Yet in 580, Slavic raids resumed and involved much greater numbers, with greater ambitions too - instead of typical looting, these raids even aimed to conquer cities. This can largely be ascribed to the fact that the Eastern Romans were distracted by war with the Persians, and in 592 the Avars even broke through to Drizipera, just ninety miles from Constantinople.
But once peace was made with Persia, the Romans were easily able to deal with the Avar problem. This is well-demonstrated by the late c6/early c7 Strategikon, likely written by a high-ranking officer, and the History of Theophylact Simocatta, which detail numerous successes against the Avars and Slavs. From 590 to 602, Roman armies even campaigned north of the Danube. In 597 the general Priscus destroyed "almost the entire Avar army and the khagan’s four sons at its command” (Theophylact Simocatta, History VIII.2.2-8.3.7), and numerous other Avar defeats soon followed.
The Seventh Century: Roman Collapse
But from 602, the Roman position in the Balkans quickly deteriorated. The Emperor Maurice (582-602) was deposed in a coup by Phocas (602-610), and in 605 Phocas moved troops away from the Balkans, giving the Slavs and Avars time to remobilise. And subsequently, Heraclius (610-641) was entirely preoccupied with the threat posed by Khusro II in the east, transferring soldiers to the eastern front in 620. This gave the Avars almost total autonomy in the Balkans, and in 626 they even laid siege to Constantinople. They were resolutely defeated by Heraclius, leading to massive internal conflict within the Avar khaganate.
Still, the fact that the Romans were so distracted by the Persians, allowing the Balkan front to deteriorate rapidly in the 580s and then in the early seventh century, shows one key point: The Eastern Romans always prioritised threats to their eastern frontier over threats in the west. This was a political and military necessity. Heraclius was therefore unable to exploit the weakened prestige of the Avar khagan follow the total defeat of the Avars at the 626 siege of Constantinople - he was entirely focused on warfare with the Persians, crucial for the Eastern Roman empire's survival, and subsequently was forced to deal with the Arab threat.
The power vacuum created by Avar weakness post-626 was thus exploited by other powers; the Bulgars were able to expand to the north-east plains of Thrace, even challenging Eastern Roman control over routes to Constantinople, and Slav chieftaincies were established with minimal resistance from Thrace down to the Peloponnese. Control deteriorated quickly with the inhabitants of the Balkans effectively left to fend for themselves as the imperial forces were entirely on the Arab threat. Thus Justinian II, in 687-8, was even forced to fight to Thessalonica when he wished to travel there. Only by the late eighth century were the Eastern Romans able to concentrate on the Balkans again, simply because Arab pressure on their eastern frontier lessened.
Slavs who settled in the South, e.g. in the Peloponnese and near Thessalonica, were subject to processes of Romanisation, absorbed into the Greek-speaking and Christian world. But for the most part, the complete collapse of Roman power in the Balkans allowed Slavs to retain and further develop their own social and political culture. Small Slav groups were able to lead an effectively independent existence from the Roman, Bulgar, and Avar states.
Summary
Hopefully I have shown that the Danubian frontier was inherently vulnerable in terms of its strategic geography, and so we shouldn't be surprised that raiders were so easily able to cross the Danube. During the sixth century Roman authorities from Anastasius to Justinian sought to improve these defences, and this did help to some extent in deterring raids on Balkan territory. Under Maurice, the Romans were able to reassert control against the Avars and made a series of successful forays north of the Danube. The total collapse of the Roman position in the Balkans, and the rapid settlement of new powers (primarily the Slavs and Bulgars) can be explained primarily by the fact that imperial authorities were almost entirely distracted by warfare on their eastern frontier against the Persians and subsequently against the Arabs. This frontier was continually prioritised, and drained manpower and resources from the Balkans in order to fight a struggle for survival against Khusro II and, soon after, the armies of Muhammad. Thus the Slavs and Bulgars were able to settle in the Balkans effectively unopposed.