Clover is a nitrogen fixing plant - used to be that you’d plant clover for a year in between other crops to make your soil fertile again.
(It’s the bacteria in the roots that do the actual nitrogen chemistry.)