That is a huge bummer. You have two unpleasant choices. Suck it up and get on with life (my recommendation) or talk to the PI and go through the drama of trying to get the two names removed. I guess there is also the nuclear option of contacting the editor and saying those two contributed nothing but hopefully you are not considering that. Next time be the corresponding author. Try to focus on research where you have control. I know that's not always possible but it's worth aiming for first author/corresponding author as often as possible.
Yes i think i will just suck it up and make this a lesson for the future..
There's a third choice: talk to the PI without sounding like you're blaming them, and without demanding to remove the names. This way you call attention to the practice and make them think twice before doing the same thing on future publications, without rupturing the relationship.