Hi Pusang,
what i gathered from people on permies and the book Teaming with microbes is that legumes form these nodules on the rootssystem which contain bacteria that take N2 from the air and bind it into NH4+ if i remember right, anyway, something with N, the plant needs it to grow healthy stems, chlorofyl and DNA. The nitrogenfixing bacteria do this in exchange for sugar the plant transports to their nodules. Some kind of lodges inside the plant save from predators. If you chop the legume half down they self prune their rootsystem, i forgot why, but this leads to an uptick of these bacteria in the soil. Which just continue fixing nitrogen. Also you get the bonus of having this foliage which you can use as a mulch/ soilbuilder/
compost, after breaking down it will add nitrogen to the soil. The plant will soon grow back and grow it's rootsystem again. When the plant dies, all the nitrogen fixing bacteria go back into the soil and you can keep the seeds to have more plants the year after.
Sometimes ,especially in rich soils these nitrogenfixing bacteria are hard to find, leading to stunted growth. To be sure the plant has them in the rootzone, you can buy them, it looks like a yeast and dissolve it in
water and just soak the seeds in it before planting.
I never do that, and checked the nodules on my clover, pretty small things, and if you cut it right through and the inside is red it means the nitrogen fixing bacteria are in.
I might wuzz up some clover rootsystem with nodules next time to make sure the bacteria are in next time. Anybody did that? Saves money.