This is very true, when I work out alone vs with my friend I usually do less.Most people never truly push themselves...they only push themselves to their preconceived limit in their mind and then never push past it.
To counter this, I make a conscious effort to push 1-3 more reps on whatever I do once I feel like stopping. It's probably not as effective as my friend shouting "two more!" when I'm about to quit.
I saw a dude at the park yesterday timing his rest doing pullups, I shouted out to him to keep going and counted him out 3 more reps, he was exhausted but laughed and said thanks.
A lot of our productive output in life is based on mentals/being pushed. It's human nature to seek the path of least resistance. Actively push yourself to do 1-3 extra reps, more if you can, whenever you can.