Patents are an economic development program that the government uses to subsidize R&D in the private sector. You're right -- just looking at litigation costs isn't enough. You have to compare a patent program to other kinds of R&D incentives, such as prizes and grants.