This isn't so much of a history question as a microbiology question, and one that, I, a long time non-historian lurker and microbiologist can answer.
First, I want to clarify that epidemiologists define disease outbreaks in different ways, namely to differentiate between diseases that circulate at low levels in certain area or in a certain population (endemic) versus diseases that spread rapidly into new areas and new populations (epidemics). Pandemics are global epidemics, such as the currently circulating SARS-CoV-2 pandemic.
With respect to the bubonic plague, a disease caused by the bacterium Yersina pestis, it is endemic to small rodents that occupy semi-arid grasslands areas. The current thinking is that small rodents, Great Gerbils specifically, occupying Central Asia (the 'Stans) were the source host of the bubonic plague epidemics that struck Europe repeatedly over several millenia.
So how did a bacterium inhabiting rodents in Central Asia happen to repeatedly cause epidemics in Europe? Well, that is an interesting story that involves rodent population biology, climate, human trade routes, and poor sanitation.
The story begins with the Great Gerbils that forage for seeds in the grasslands of Central Asia. Their population sizes are largely dependent on the amount of forage they are able to acquire. In some years, there is much rainfall in the semi-arid grassland. Grasses grow well and produce an abundance of seeds. Great Gerbils are happy, fat and produce lots of babies. The population size increases. Unfortunately, Y. pestis tends to spread well among high-density rodent populations, so many of these rodents are infected, but it does not seem to affect them as badly as it does humans.
In the years subsequent to the year of abundant rainfall invariably it rains less. Grasses are not as abundant and do not produce as many seeds. However, there are still plenty of Great Gerbils as they can live 2-4 years. So there is much competition for food, and the Great Gerbil population tends to decline. Great Gerbils become rapacious and hungry, and they grow bolder and travel further seeking food. Across their lands come great caravans traveling along the Silk Road. Carried in these caravans are grains, rice and other foodstuffs. The Great Gerbils raid these caravans seeking sustencence. While doing so they no doubt encounter humans and other animals. Fleas bite Great Gerbils and then bite the humans and other animals traveling in the caravans. Y. pestis is carried by the fleas from the Great Gerbils to the human traders.
The humans continue their travels to the ends of the Silk Road and the great trading centers bordering the Mediterranean. Infected humans and animals spread the disease to rats occupying cities. Poor sanitary habits and practices ensured its rapid spread once it arrived in the cities. Soon sailors and traders and infected rats board ships traveling the Mediterranean. The bubonic plaque spreads to the great trading cities on the southern flank of Europe, Genoa and Venice (from whence we get quaranta giorni, quarantine, which mean 40 days). From there, the plague spread north through along trade and pilgrimage routes to cities and towns of Northern and Eastern Europe.
So why are there only periodic outbreaks of the plagues? As you can see, epidemics require a chain of successive events beginning with summers of increased rain on the plains of Asia. Breaking any link within the chain will prevent the epidemic from reaching Europe. In addition, it is likely that following a major epidemic, much of the surviving population was now immune to the plague, ensuring that another epidemic would not return for decades.
Sources:
Climate-driven introduction of the Black Death and successive plague reintroductions into Europe. Proceedings of the National Academy of Science, https://doi.org/10.1073/pnas.1412887112
Plague: Past, Present and Future, PLoS Medicine: https://doi.org/10.1371/journal.pmed.0050003
Epidemiology of the Black Death and Successive Waves of Plague, Medical History: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2630035/
The history of the plague and the research on the causative agent Yersinia pestis, International Journal of Hygeine and Environmental Health, doi: 10.1078/1438-4639-00259
Historical Y. pestis Genomes Reveal the European Black Death as the Source of Ancient and Modern Plague Pandemics, Cell Host and Microbe, https://doi.org/10.1016/j.chom.2016.05.012
Neither of the 1st pandemic nor the 2nd pandemic of the bubonic plague was one-time transient outbreak in Western Eurasia. At least successive tides of [smaller] outbreaks of the plague lasted about 2 centuries for the 1st pandemic (thus up to about the middle of the 8th century) and nearly 4 centuries for the famous Black Death, up to the 18th century. They damaged not only the population, but also supra-regional exchange networks that had also tied former Roman Empire economically together.
The extant written evidence especially in Early Medieval West is so fragmentary that we have difficulty in calculating the exact lethality of these successive outbreaks, but the deductive estimation, based on that of successive outbreaks of the plague in 15th and 16th centuries, the lethality ratio of the plague tend to decline in long-term, perhaps due to the herd immunity or other reactions of the human behaviors to the outbreak.
I wrote a bit about the possible impact of the successive tides of outbreaks in Early Medieval West in the following threads:
References:
[Edited]: fixes typo.