Because that's what brave people do. When you hear about people that made tyrants fall, they didn't do it from the comfort of their home.
but then again, maybe Alexey or his supporters didn't expect him to be arrested this fast
Strangely enough the Russian government still want to appear to have a legitimate democracy, probably caring more about the appearance to the governed rather than to outsiders.
He wanted as much attention as possible. He can't do anything from Germany and neither from hiding somewhere in Russia. So this was his best shot right now.