Вот тебе и раз.
What does it mean? Why “раз’’?
It is an idiomatic /"coined" expression and those do NOT translate literally in any language. You simply memorize those as they are,as a unit.
the word "раз " here is simply emphatic.. by itself it means same as French "fois" like in "une fois " and Italian "volta " like in "La prossima volta.." The whole expression means exactly what @AnnieMod pointed out -"for crying out loud!" another(in my opinion) similar meanings in English: "Yeah,here,just look at this!!" "Wow!! Look at what just have happened!"
Hope this helps you..:-))
That's another of those set phrases that may have an explanation but you still need to remember by heart.
That one (with or without the и before раз) is something that you say when you are surprised in a bad way from something you did not expect to happen, with a strong negative connotation (similar in some ways to the English "for crying out loud", "yeah, right" and other similar expressions).
Other forms of the same: вот те на: https://ru.wiktionary.org/wiki/%D0%B2%D0%BE%D1%82_%D1%82%D0%B5_%D0%BD%D0%B0 and some others: https://dic.academic.ru/dic.nsf/efremova/148902/%D0%92%D0%BE%D1%82
Dear AnnyMod! Of course, I know all this. I just try to acquaint people with some very usual but sound tricky Russian spoken phrases. Your explanations are absolutely perfect. But please, don’t give them so soon. First, let others put 2 and 2 together. I think we will have a fun.
Well, I see someone asking a question I can help with, I assume they need help :) So I am being helpful :) Idioms can be a pain sometimes :)
Next time you post one of those, explain in your question what your goal is.