Is this 吗 meaning 什么? (I read somewhere that this is Northern Chinese dialect.)
I was about to say "no", but I suppose you could say that. "干吗" means "What are you doing?" I think one of my books translates it as "Why on earth?" Although that sounds too strong for me. In terms of grammatical structure that is one way of thinking of it.
穿这么少干吗? = Why (on earth) are you wearing such scant clothing?
I think "干吗呢你" usually shows surprise or incredulity at what a person is doing but "What on earth are you doing?" In English shows almost a total disbelief that this could be happening!
If I leave my compound my neighbours will ask me: "干吗去?" Which you could translate as "What are you heading out for?" Don't believe any book which tells you this is merely idle politeness. They want to know!
If I log onto QQ, a friend might start an online chat "嘛呢?" In English we would probably say "What are you up to?"