With the American primary election system, legislators are driven to cater to their most extreme constituents. With transparency, they can't work across the aisle AND also win a primary. At least with pork barrel, they get a tangible thing to point to while campaigning to attempt to appease constituents.