I don't know where you heard "bah oui" :) ...maybe from a french person...in fact, "bah oui" is a sleng way of talking, the current meaning is 'of course' or 'surely' ...it express a way to answer to somebody, but without saying 'of course' or 'surely' because the person who's saying this do not want to hurt (I think) the other person who is saying something obvious...or because a person do not trust or is agree with the discussion....(its more a reaction than a response)
'mais oui' have different meanings...but the person who is saying this is always saying this for him/herself, maybe to show to the other person that he/she is not agree about something, or maybe because he/she didn't think about something that another is telling him/her....
Both expressions are using by native speakers, cause they know when and where in a discussion they can say it...
My advise is to not saying this expressions, because it's not so polite, and because it's a delicate shade of meanings...but if you want to make laugh a french person when he/she's saying something not so important you can say 'bah oui'...
I don't know if it's a clear answer...maybe others french native speakers can answer too...........