Because the phenomenon is quite common, they are looking for a selective advantage:
A surprisingly wide array of creatures, all the way up to some vertebrates, dump significant stretches of DNA during early development, so the stretches don’t end up in most of their body cells.
To date, scientists have observed the phenomenon in various insects, in lampreys and hagfish, in hairy one-celled life forms called ciliates, in parasitic roundworms and tiny crustaceans called copepods. They’ve seen it in rat-like marsupials called bandicoots and in songbirds — probably all songbirds, according to recent work. And they expect to find many more cases.
Alla Katsnelson, “The curious case of the shrinking genome” at Knowable Magazine (October 21, 2021)
The reproductive cells retain all of their genes and the retained genes in other cells are all active. Thus, one hypothesis is that discarding is a way of preventing inactive genes from hanging around and causing trouble. But then, why don’t these life forms use gene silencing tags, as other life forms do?
Another weird thing researchers discovered is that the fungus gnat has an extra genome, apparently that of another species, inside its germ cells.
Overall, it’s not nearly as simple as we might have expected.