Edit: rewrote everything because it’s actually easier than I was explaining it:
It’s not about being polite or rude, it’s an indicator of your relationship with the person/s you’re addressing.
It’s not like you can choose how you say something to set a certain tone. „Would you pass me the butter, please“ doesn’t get more polite using „Sie“.
Who you’re talking to defines what to use.
When you are introduced, it’s easy: „Hey Bob“ -> informal -> „Du“; „Hello Mrs. Robinson“ -> formal -> „Sie“. Mixing them up just doesn’t happen, except for very small children who sometimes use the informal „Du“ with „Mrs Krabappel“.
It only gets complicated because it also is used when you do not know each other, like on the street, at a restaurant, etc.
Then it’s a judgment call what to use depending on the context. Either there’s some social clue (age, location, class, etc.), or whoever goes first sets the tone, but it’s still pretty much along the lines of „would I call her Kathryn or Cpt. Janeway“.