Ever since Hume's analysis of causation, it has been clear that events in the world are not connected by necessity. "Laws of nature" are descriptive, not legislative. They are devised by man for the purpose of organizing his expeience. Einstein wrote:
Science is the attempt to make the chaotic diversity of our sense-experience correspond to a logocally uniform system of thought. ... The sense-experiences are the given subject-matter. But the theory that shall interpret them is man-made. ... hypothetical, never completely final, always subject to question and doubt.
('Pragmatism and Science')