The primary function of law is to provide a framework for social order.
Your self-worth is determined by you. You don't have to depend on someone telling you who you are.