The reasons for this may vary. The loss of structure and function may be a positive adaptation which saves energy and materials. But it may be simply a by-product of genes selected for other functions (pleiotropy). Or the structure may be linked in development, and affected by selection for some other structure. 