Other units give support in terms of morale and cohesion and... support.
For example if 2 cavalry units attack one enemy cavalry unit, you will see
1- one cav Vs one cav
2- if the cavalry that lose the melee is the cavalry with support from another, the supporting cavlry will engage the victorious enemy and (in most cases) rout it
3- if the cavalry that lose the melee is the cavalry without the support, the supporting cavalry will pursuit so providing prisoners in most cases