It all depends on the parent. The service is more to help the parents grieve then anything. When my brother lost his son at 31 days they decided to do a small service to help them greive.
I doubt it is mandatory, though it can be very comforting to have the baby handled by a memorial service instead of just left to disappear in whatever way the hospital does it. When I miscarried twins, I had them cremated, and put their ashes in my flower garden, and it made me feel better that I had not let them go some anonymous place.
Not really sure but my cousin had a still birth nd she had the baby funeral n her home town at a church closed casket funeral
Not sure if its mandatory or not depending on state maybe..but from family experiences my sis had a still birth and the hospital did give her a lil ceremony and box with babys prints ,pics, etc.. It also may depend on the type of hospitals for.instance a catholic hospital might do things diff. My sis was in a jewish hospital.