WASHINGTON—Banks' ownership of oil pipelines, metals warehouses and other commodity assets poses a significant risk to the financial system while imposing extra costs on companies and consumers, lawmakers and witnesses said at a Senate hearing.

The criticism comes as the Federal Reserve reconsiders its decade-old decision to allow big banks to trade, store and transport raw materials, threatening what has become a lucrative business for Wall Street. Goldman Sachs Group Inc., J.P. Morgan Chase & Co. and Morgan Stanley,...