to ask for trouble
Você sabia que ela era casada, agora o marido sabe de tudo, você arrumou sarna para se coçar!
You knew she was married, now her husband knows everything, you asked for trouble!
Sarna (scabies) is an itchy skin disease no one would wish for, so to arrumar sarna pra se coçar ("to get yourself scabies just so you can scratch") paints the absurdity of deliberately courting trouble you could easily have avoided.
Source: Revista Pesquisa Fapesp.
Falando's Idiom Trainer teaches you to recognize idiom meanings and create sentences using them, so you can speak like a Brazilian.