Is the filing of a card compulsory?
No, the player does not necessarily have to discard a card. In the official rules it says:
„The players have the option not to discard a discardable card“
This may be appropriate for strategic reasons.
Here is an example:
On the discard pile there is a red 7. In my hand I hold a blue 7 and green 8. I know that my next player only holds a blue card in his hand, because he wished for blue before. In this case it is advisable not to discard the blue 7 and to draw a card instead.