If you plant a berry then the tree will have two or more berries, so you double up. Some berries have useful effects like healing or removing status ailments and if you equip them on a pokemon then they'll use them automatically, rather than wasting a turn.
As for the pies, those raise contest stats, so that contests are easier to win.