Until about 150-200 years ago, Math and Physics were not even considered separate disciplines. Before then, Mathematics was just the language one used to describe the natural world. Thus one can reasonably claim that all mathematics older than this has its origin in physics.
Physics is the science of measurement. Mathematics was developed as a tool for discussing those measurements. The Babylonians and Egyptians in particular had collected a large cache of algorithms for calculating various measurements, particularly areas and volumes, which were used as physical laws: "If you have this shape and size of container, how much water will it hold?" They arrived at these rules by some basic reasoning, but mostly from experimentation. They had no means to distinguish between fully accurate and approximation. The Greek Thales of Miletus saw that certain parts of their accumulated knowledge could be deduced from a few simple principles, which was the birth of mathematics as we know it today.
All of ancient Greek mathematics was about describing the real world. They disdained the idea of testing their ideas by physical experiment, but this was from a belief that is wasn't necessary to test - that logic was sufficient to divine all principles. It was not from any idea that mathematics was detached from the real world. Rather the real world was considered a corruption of the perfect world of their conception.