吧 is used at the end of a question when you already assume the statement to be true.
(modal particle indicating suggestion or surmise)
Whereas had you ended the question with ma (t: 嗎, s: 吗) then it is just a question, no assumption behind it, you are asking because you honestly have no clue.
As for the politeness level of 吧, while it is certainly non-formal, it is not inherently impolite. Even in English,
This is yours, right? is not necessarily offensive or impolite, probably depends on the situation. For example
- positive: someone may have been looking for their misplaced coffee and would be delighted to hear you bring their coffee and say
This is yours, right?
- negative: On the other hand if I point to an unwanted piece of litter on the ground and say to you
This is yours, right?, I'm accusing you of being a litterbug, so it is a slightly different story.
It's not particularly impolite, but if for some reason conveying that you assume something, will somehow come across as rudeness on your part, then instead of
ma (t: 嗎, s: 吗)