“Happy as a clam” seems to assume that the mollusk is indeed happy.
This notion was probably inspired by the observation that if a clam is held sideways and looked at straight on it appears to be smiling.
However, the expression is incomplete.
It began as “happy as a clam at high tide.”
High tide is, of course, the time when clams can feed.
High tide is also a time when clams are safe from clam diggers which, obviously, would make them very happy.
The word clam is derived from the same Scottish word that means “vise” or “clamp.”