If they are so bad, how did the Rajapaksa family get into power? Because they were the generals that crushed the Tamil Tigers in the Sri Lankan Civil War that started in 1983 and only ended in 2009. They forced the rebel LTTE into the northern part of the island and blasted the hell out of them with artillery, killing their leadership. In the 1970s and 1980s there were communist insurgencies that wracked the country. Sri Lanka has not really been a stable, peaceful country for most of its existence.
Also not mentioned is the insane decree by President Rajapaksa in 2019 that all farmers in the predominantly agricultural country had to adopt organic farming practices immediately, with no preparation and no training. There were massive crop failures and now even rice has to be imported. Sri Lanka is a socialist country by the way. It's in the official title of the nation.