Law can be defined in many contradictory ways, depending on one's political and ideological opinions. Some of these ways are listed below. You might agree with some, but not with all. However, all of these definitions contain a grain of truth.

Law is a set of rules...
...used by the weak to keep the strong under control.
...used by the powerful to oppress the powerless.
...used by the majority to make the minority live by their rules.
...used for punishing the bad people.
...used for punishing those who don't conform.
...that safeguard morality.
...that protect the poor from being exploited by the rich.
...that justify exploitation of the poor.
...necessary for a smoothly-running society.
...that take away personal freedom.

Also, law can be divided into three categories:

Ethical Law, which enforces ethics and human rights. Such law for example forbids murder.

Functional Law necessary for a smoothly running society and economy. It deals with concepts like contracts and obligations. An economy, for example, cannot work if contracts don't have to be honored.

Moral Law: Codifies the sense of what is right and what is wrong or indecent held by the society. For example, the law that makes it illegal to show your genitals in a public area is such a law. These are the laws that differ most between different legal systems and might include some strange stuff, at least from your point of view.