This is a great question, which, in some basic sense is outside the realm of physics. This is because physics deals with discovering the laws of nature and understanding them, rather than asking where they come from.
Nonetheless, there is a very obvious fact about the laws of nature, which may provide a clue to the answer. One of the most interesting properties about the basic laws of nature is that often they can be expressed by (relatively) very simple mathematical formulae. Very simple formulae can well describe a wealth of phenomena which seem, at first sight, unrelated. A good example is Newton's universal law of gravity, which describes very well the motion of many different objects on very different scales - planets, apples and many more. Perhaps the most striking thing about this law is its simplicity: according to this law, every two massive objects attract each other by a force that is linearly proportional to their masses, and inversely proportional to the square of the distance between them. In math lingo, we write that Force ~ m1 m2 /r2. The amazing feature is the square that appears in the denominator: why is the index of the power law equals to the simple number 2? It could have been 2.14, but it isn't.
Even more interestingly, many - (nearly all) - of the fundamental laws of physics originate from the mathematical requirement of symmetry. That is, the laws are independent of our choice of coordinates, and, in a more general form, are independent of some "abstract coordinates" used in describing the functions used in formulating the laws. For example, the physicist and mathematician Emmy Noether showed that the basic law of conservation of energy is rooted into the requirement of symmetry under translation in time. Similarly, conservation of linear momentum originates from invariance under spatial translation. (In simple words, this means that two observers looking at the same system from two different locations, should see the same thing). Nobody really knows why this is the case; but it seem that the requirement for symmetry - which is often associated with beauty, as is felt in many different arts and in everyday life - is rooted very deep into the nature of physical laws. Thus, often new theoretical ideas are judged by their "beauty" - namely, how simple their formulation is. Thus we know of the amazing connection, which is not really understood, between the basic laws of nature and the intuitive feeling of "beauty".
One needs to be somewhat careful, though. As we know, symmetry cannot explain everything; our universe is more complex than that. Thus, in addition, there is in physics the concept of "symmetry breaking". One example is when a symmetric crystal (such as, say, Ice), is melted; some of the symmetry is broken.
It is widely believed that the concept of symmetry is rooted very deeply in the nature of physical laws. As a result, current theoretical exploration in the search for further unification of the forces of nature, including, e.g., gravity, is largely based on the search for new symmetries of nature. One good example is the theory known as "supersymmetry" (SUSY) which suggests an extension to the "standard model" of particle physics. According to this theory, every known particle has an associated "superpartner"; though no such "superpartner" particles were detected so far, many physicists believe in this theory, as it provides a very elegant and beautiful explanation to some of the unsolved problems in physics today, such as the cosmological constant problem.