Surrounding a pet with the items that they like will increase their happiness. Their happiness is denoted by the heart symbols over their head. On the other hand, surrounding a pet with items that they dislike will decrease their happiness. Removing disliked items will make their happiness go up again.
The higher the happiness level of your pet is, the more you'll receive spirit essence from them. You may even receive higher versions of spirit essence.
Yields for trees and plants work the same way as happiness does for pets. Trees and plants will have specific likes and dislikes. Surrounding a tree with the items they like will increase their yield when they are harvested. This is denoted by the leaf icons over them. The higher the yield of a tree or a plant, the better the rewards you'll receive.