Fun isn't the only thing games are meant to deliver. I used to think that it was, and for the vast majority of games out there that still remains true, but I no longer think that's the only thing games are good at anymore. There are a myriad of other values that can be used to engage the player other than fun.
Most genres are still firmly stuck in the fun mindset. Platformers are meant for fun, if I'm not enjoying myself as a giant ape smashing through the forest then you've failed to engage me. For most genres fun is how they engage the player, and it still works. I'm not one to try and force other types of engagement onto others if it isn't what they want. Most people play games to relax and unwind after a hard day's work, and I get that.
Still, there's so much more out there. Games have the potential to really influence the player and change their mindset without being necessarily fun. Take Spec Ops: The Line; that game was not fun to play at all, the controls were pretty bad compared to other games of the genre, but it forced players to confront their inner demons and question why they just did all that they did in the game. It was not fun, but it was profound.
There may be other games like Spec Ops in other genres as well, but I tend to find this other type of engagement more in visual novels. Some may not even call them real games, and I think I know where they're coming from. The main means of engagement of visual novels is usually not fun, because most of the time you're just clicking a button to make the next bit of dialogue come up. That's not a fun means of interactivity. You're there to get your story and character development on, even with other games like Professor Layton and Ace Attorney which have puzzles and investigations and whatnot as well. There are moments of comedy and fun, to be sure, but that's not the reason we're there, is it?
My main example of a game which I consider great without being fun is Katawa Shoujo. Now, I'm pretty sure I'm the only person here who's actually played it, but I can tell you from personal experience that this is a profound game. I was so wrapped up in the earnest and heartfelt story being told that I wasn't aware that I wasn't having 'fun' at it, rather that I was enjoying the experience. Later on it gets really hard to progress onward, not because of some mechanical difficulty but because what happens is so heart-rending that you almost don't want to know what happens next. Several times I had to actually stop and think about the situations at hand for a long time because I didn't know what to do. At the end of it all, I can say that this game has impacted my life, not only in its emotional impact but also in the life lessons I have taken away from it.
So, to wrap it up, games are mostly fun... but sometimes they can be so much more.