Spitting into the wind.

This idiom or expression has to do with:

Going against the flow.
Fighting a war that you can’t win.

If someone says “Arguing with your boss is like spitting into the wind,” they mean something like:
You might get fired.
You’ll be sorry for sure.
You’ll have to forget about any promotions in the near future!! Etc.