TCP is a guaranteed delivery protocol which not only give guarantee of delivery of packets but also correctness whereas USP does not provide any such guarantee. That is the precise reason why UDP packets include checksum field as optional (16 bit CRC checksum) which the receiving operating system will use to check for packet corruption. If the checksum is present and fails, then the packet will be silently discarded. It is up to the application to notice that the packet disappeared and take corrective action, where in case of TCP re-transmission takes place.
Yes unlike TCP, Checksum calculation is not mandatory in UDP. No Error control or flow control is provided by UDP.
Hence UDP depends on IP and ICMP for error reporting.
So it depends on other layers hence not mandatory requirement.
Ref:
https://www.queryhome.com/tech/157481/why-tcp-checksum-is-mandatory-but-in-udp-checksum-is-optional