CI has enough frequent fliers and multiple daily flights at SFO to justify operating its own lounge. They probably also make decent money from PP and serving overflow SkyTeam elites when they are not busy with CI departures.
SFO-TPE has heavy J cabin demand due to all the tech business located in the Bay Area so having its own lounge is important for CI. Anecdotally, the lack of decent lounge option at LAX for CI is a common complaint from a lot of frequent travelers I know on the route.