For anyone curious about the future of democracy, two developments out of Brazil and Germany pose something of a mystery.

The election of Jair Bolsonaro in Brazil looks too similar to the wave of right-wing, anti-establishment populism sweeping Europe and the United States to be dismissed as coincidence. Mr. Bolsonaro, known for praising his country’s former military dictatorship and insulting minorities and women, has championed anger at Brazil’s establishment by promising strong-fisted rule.

Underscoring the sense of a global shift, within hours of Mr. Bolsonaro’s victory, Angela Merkel, Germany’s longtime chancellor and pillar of European stability, announced she would not seek re-election.

Yet there is no obvious link between Mr. Bolsonaro’s rise and that of Western populists. Figures like Prime Minister Viktor Orban of Hungary and German populist parties rose by railing against the European Union and immigration, neither of them issues in Brazil. Mr. Bolsonaro rode a backlash against corruption and crime epidemics that are distinctly Latin American.