Harari posits that capitalism and the desire for wealth drives a lot of innovation, often because those innovations are made with the object of reducing expenditures or taking advantage of a resource in order to acquire wealth, such as when large companies invest significant amounts of money into research and development. Empire and imperialism drives the progress of science as well, in the form of governments pouring taxpayer money into defense contractors or their own research divisions in order to develop superior technology or weaponry that would allow dominance over other nation-states, or pursuing science as an extension of colonialism (272-274, 278). An example of this would be the Second World War. Harari argues that both capitalism and empire are necessary for progress: science would not have the resources to make leaps forward otherwise (Harari, 250).
An example of scientific discovery being shaped by science and shaping science would bet the Second World War. Many new types of weaponry and offensive technology was developed during this era, as was the famous Manhattan Project. (Harai 260-261). This would lead to sweeping changes to society in the aftermath of the war: technology like jet engines that provided a tactical advantage in the air now provided a quicker way to ferry paying civilians across the ocean and changed commercial air travel in the 50s and 60s.. while the development of the nuclear bomb locked the globe into a precarious political position known as the Cold War.
I think the idea of progress is really important to science, capitalism and imperialism, but it was influenced more by them than doing the influencing itself. Humanism, focus on earthly life and human desires, as a way of thinking did not become prevalent until recently in human history. In many cultures, especially European cultures at the height of the Catholic Church’s power along a myriad of religious cultures throughout history, the educated population that could drive scientific progress were often members of the religious body or otherwise tied closely with it. To push for new ideas that challenged the teachings of the institution was a risky act. Many early discoveries were made by religious institutions, which controlled the empire and the capital in many cases, but at the same time progress was also retarded by them as well.