The theme in this story is man will abuse or even exploit others to get what they want. In the story there is a recuring archetype of entitlement. The sun trespasses on the moon’s time simply because it can. The the walrus and the carpenter trespass on the oyster’s territory because they represent man and man can do what they wish as they wish.
This is comparable to the constant wars over land possession today. This story is also slightly touching on the topic of child predators. The walrus and the carpenter sheepishly lead away the innocent oysters to their demise.