Personally, while I like to see all the hands immediately when the action is finished in an all-in situation, and that's the custom in most home games I've played (one friend of mine encourages it by saying "let's turn 'em up for the fans"), and while it is (for whatever reason) the usual rule in tournaments, the main consideration to me is that the rules in cash games in all the casinos I've been in, do not require an immediate tabling of your hand before the entire board is dealt, just because you happen to be all in.
There are rules in every casino that dictate who must show first, and they vary from casino to casino; sometimes it's whoever took the last aggressive action (the person who initiated the last bet or raise before being called). Sometimes "last aggressive action" only is in force when there was action on the river, and if not, show in turn from the button applies. In some places, show in turn is the rule even if there was action on the river. But there IS a rule, and if it's your turn to show, you should do so promptly.
I used to show my cards a LOT, win or lose, at the end of hands, all-in or not, and of course eventually learned that this gives other players information about how I play. Now I try not to show my hand EVER (I still slip up some times, such as when I feel I need to justify my play to the table, such as when I call all-in with a losing full house) - unless I'm supposed to; when players ask "what did you have", I simply reply "I'm not good enough at this game to start to give you extra information."
One outstanding reason NOT to get in the habit of showing your cards when you're all-in is that you may, especially in a perhaps-stressful or tilt state, expose your hand when there's still action to be had in a side pot -- hopefully everyone understands why that's a bad thing. You might even expose your hand when a player calls your all-in, not realizing there's another player yet to act on your own bet, which could be costly to you. Of course, if you never make these mistakes, never mind, but if you do, or could, then one solution is to make it your habit not to show until the river is dealt AND all action is complete.
Please understand that I do NOT condone slow-rolling either. Even if I'm not required to "show first", if I have the nuts, when the board is complete, I immediately table my cards and announce I have the nuts. The bad news is, the other player now can muck their hand, even if they were supposed to be the ones to "show first", and I lose access to information about what kind of hand they played (and this is true even if it's not an all-in hand). I probably should, if I'm not required to show first, ask to see the other players' hand(s) first, even with the nuts, to gain that information, and then promptly show my hand (but in fact, I'm not that great a player and don't make optimal use of the information, although I would certainly remember if a player bluffed all-in with a draw or a missed draw, vs betting all-in with a set, or unimproved AA, for example).
Sometimes, when my opponent tables their hand at the conclusion of the action, I'll look at my cards a little longer to make sure I haven't mis-read my hand, and that I've really lost, before mucking -- and on rare occasion, I do notice that I made a second pair I wasn't looking for, and have a winner, and then when I table my cards, I explain that the "slow roll" was because I was still figuring out what I had, and that if and when I slow-roll a winner, it's because it took me a while to realize I in fact had a winner.
On the other hand, if I were required to show, I would avoid those hands where I realize, as my cards float into the muck face down, that I've just folded a winner. This has happened to me when someone has announced they have a straight and I've mucked, only to find out that when they table their cards, they were mistaken / misread their hand. In that situation, I now say "show it to me and I'll muck". I have not yet, to my knowledge, played against an angle-shooter who has done this to me intentionally, but that could certainly happen too!
I've also mucked prematurely when someone announces "two pair" assuming they have better than my own weak two pair, only to find out they have a small pocket pair to go with the board pair, and I had them beat. So if you can make mistakes like that, maybe you should always table your cards. When I was learning Omaha in a small-stakes home game, I always tabled my cards, and often found I hadn't read my hand correctly, until I got the hang of it (yes, as you're learning, I'm not that good
The bottom line is, there are good reasons for not showing immediately when all-in, and there are decent arguments that can also be made for tabling your cards -- as long as players are complying promptly with whatever the rules are in a game (e.g., in a tournament all-in situation, the dealer usually won't proceed with the board until the cards are shown), and as long as they are showing their cards promptly (i.e., NOT slow-rolling) when it is their turn to show, I don't think anyone can make a strong argument over how a player chooses to handle the situation.