Well, if you are British, you would not say such harsh words, if you ever bothered to listen to the types of questions asked by British Immigration officers, when they interview Asians - or pretty much non-Caucasians ..
Questions have ranged from "so you are here visiting your boyfriend, which bar did you meet... " and "when did you meet" followed by a call to the BF to ask and confirm the details ..
Don't get me started on Australian Immigration .. or US immigration ..
If you are shocked at such questions, me, in my humble words, says .. well, you got off easy ..
You should have demanded she explain the need for such a question .. and see what would have transpired .. on top of it .. when you say you been to Malaysia a couple of times, in local terms, that is known as "Visa Runs" and a lot of people do it for legit and illegitimate purposes ..
As for what laws you have broken or not .. well, I can safely say, Singapore is at the Crossroads in Asia, and, for a start, human trafficking is Immigration's primary concern .. if not into Singapore, it is Via Singapore .. I am not going to get into the details .. so the immigration, as per law, has the right to ask what you are doing here .. as one girl was asked the same question, and she went "I am here to study the culture of Singapore .. " pat came the reply "you been to Singapore for more than 60 days, there is not much you can study about the culture .. your entry is refused .. " - of course, the ICA officer could ask whether is she part timing, or doing other stuff - which is what they cannot ask or accuse - and they have to make a decision ..
The law says the immigration has every right to vet you - especially in Singapore, considering that a fair amount of Foreigners do engage in activities not allowed under the law, when you are on a visit visa - including working, running businesses, consulting .. oh, I can easily say Westerners are NOT exempt from such activities ..
I know a handful of guys, who cannot be bothered to get proper work pass, to run their businesses here, and instead, base themselves in KL and fly down and exit to extend the visa - and it is not like ICA doesn't profile them ..
Sorry if I am long winded, but it amuses me, when Europeans get 'shocked' or 'amazed' and 'annoyed' or 'irritated' .. when Immigration asks questions .. try taking an Asian to Europe or US, and see .. you will be humbled ..
Oh, there is a TV program - on Australian border Police .. take a sneak peek, and see how visitors get treated ..
Border Security - Watch full episodes - PLUS7 - Yahoo!7
PS: the law says you must show proof of return - so you can decipher it as any way you want - all the way to 'staring down the young immigration girls who don't know how to respect people .. ' ..
No offense ..