Companions can seem slightly insane, initially. They seem to like jumping into your line of fire, blocking you from leaving radiation zones, and blithely engaging in combat against overwhelming foes.
It's almost like they think they're immortal.
Perhaps, because they are.
You think you are tough, suited up in your power armor, with all your perks, weapons, medicines and so on? Piper can take a fatman nuke to the face and it only knocks her out for a short while - she does not have any weapons because she has never really needed them.
Your companions are indestructible tanks. If you want to use them properly, you should be using them to distract your opponents. This can be opening combat, or this can be to hold them off while you run away. Tell them to stay, or go - they are not actually Machiavellian sadistic psychopaths - they just do not understand your delicate fragility.
You might cringe in sympathy, for the damage they seem to take, but do not worry - it's just a flesh wound.
Spoiler I do not actually play this way, because this does not fit my ideal of my character's personality, but I keep thinking that this is how I should be playing...