This could be for two reasons.
1. Your friendship points have not reached the maximum amount. It is possible for a Pokémon to be at full state without having max friendship points. When a Pokémon is full, you will not be able to feed it any more Bonus Biscuits. However, this does not ensure that you have befriended the Pokémon. You can only befriend a Pokémon once you have maxed out their friendship points, which can be done by giving them enough Bonus Biscuits.
2. You have given your Pokémon to the professor in exchange for Pokémon Candies. Just as the pop-up message before the exchange states, once you give a Pokémon away, you cannot retrieve them.