In understanding how mainstream economics creates the laws of optimizing economic behaviour Weber is only the first step. If one wants an in-depth understanding of this problem, turning to Kant is unavoidable. Without referreing to Kant we would only be able to say: mainstream economists, by creating ideal-types, can find the ultimate economic laws or law-like tendencies, but we would be unable to answer why.
It is a commonplace that the methodology of Weber cannot be understood without Kant. At this superficial level, one needs to keep in mind that our concepts are theoretical constructs that help us to understand and comprehend the world. But there is a deeper level, to be sure. Ernst Cassirer in his “Kant’s Life and Thought” gives a detailed but somehow ponderous analysis on how Kant clarified the possibility of theoretical physics: how is it possible to get knowledge about nature (physical or even our social environment) which is objectively valid. How can we build up theoretical systems which grab the laws and the tendencies of our reality, and how is it possible for us to have testable theories at all…?
Understanding Kant is the key to understanding Weber and to understanding the way how theorems are formed in mainstream economics.