Opening a cockle takes time and energy. A large cockle contains a lot of food for any bird that manages to get at it. But it also has a thick shell and a powerful adductor (closing) muscle. It would cost too much time and energy to open it.
Small cockles are easy to open, but contain so little food that it would also be a waste of effort to open them.
Medium-size cockles are the most profitable to open, which is why the oystercatcher prefers that size.