I have read that when sperms are not ejaculated out of the body, they are broken down and reabsorbed. Why can't the ovum be reabsorbed into the body instead of shedding it out during menstruation.
Apparently they are
Technically speaking, the ovum is not shed because it does not exist unless and until fertilization occurs. Development leading up to the ovum otherwise stops before the final division of meiosis.
Now, you can ask why the body doesn't reabsorb oocytes, but then the answer is that it does, in a process called follicular atresia, with one or a few exceptions per month.
Now what about that secondary oocyte that isn't fertilized? Well, it's time to pull out a lovely article from 1917 (Harry Carleton). Why are we so unable to match such prose today? The paper describes a mouse study, giving quite recognizable descriptions of membrane blebbing and nuclear fragmentation characteristic of apoptosis in a decade during which it is usually said to have been forgotten. (A 2005 work reports this for unfertilized human oocytes) Carleton likens the apoptotic changes he observed to atresia in the ovary, and says that the oocytes are reabsorbed by phagocytic cells.
Menstruation is not the shedding of the ovum, it's the shedding of the uterine lining, which prepares for fertilization even if fertilization does not occur. If there is no implantation of a fertilized ovum, the prepared lining is shed. That an ovum might be included in this shedding event is completely inconsequential (a human ovum is about 0.1 mm in diameter).
In most species, the lining (endometrium) is absorbed. The evolutionary reasons why some animals do not absorb the lining are unclear. Some speculation in the Wikipedia article includes that building a thicker lining ahead of possible fertilization is the actual beneficial trait being selected, and that the inability to reabsorb the endometrium is merely a consequence of not being able to reabsorb the thicker lining quickly. Evolution isn't perfect, and just because something could happen differently doesn't mean it will, especially if there isn't strong selective pressure for or against it. There is also previous Q&A on this site about the evolution of menstruation.