Why do you think the government needs to make rules for everyone in the form of laws?
When human beings live and work together, there needs to be some amount of organisation so that decisions can be made. Also, some rules have to be made that apply to everyone, so that there is a sense of uniformity.
Since the government is a representative of the people, they make rules for everyone on behalf of everyone. Making rules and then enforcing these rules are the only ways in which a government can function properly. In any country, the government is entrusted with the power to make laws. But making laws alone cannot amount to much. For the laws to have any effect, the government needs to have the power to make sure that the laws are followed by every individual and group. This power to enforce the laws made by it includes the power to punish or penalise the individuals and groups that go against these laws.