? there is obviously an element of attraction, but it's been seen in primates and human male that in the promiscuity of a female, male tries to be a leader , who can take care of things. For chimps male tried to be dominant. This is attributed to surge in testosterone levels in the vicinity of a girl(potential sexual partner). Testosterone increases a man's confidence and so he explains it harder ????. Btw I would recommend being closer to a girl while working but definitely not indulging too much because men are internaliser and so if you indulge with her, it will definitely distract you.