There has been some economic debate as to what determines these prices. Classical and Marxist economists argued that the factor prices decided the value of a product and so value was intrinsic within the product.
Marginalist economists argue that the price of factors is a function of the demand of the final product, and so they are imputed from the finished product. The theory of imputation was first expounded by the Austrian economist Friedrich von Wieser.