Very good question. Well, the central irony to "Just Lather, That's All" is that the barber feels that Captain Torres does not know that he is a rebel sympathiser, and thus he has his massive internal conflict over whether to kill him or not. However, it is only after the shave, as Captain Torres is leaving, that he reveals to both the barber and to the reader that he knew all along that the barber was a rebel sympathiser. This of course radically changes our opinion of Captain Torres.
In "The Gift of the Magi," on the other hand, the massive irony is situational. Again, we only come to discover the irony as Della does, when she realised with a sinking realisation that both herself and Jim have sold their most precious possessions to buy a gift for the other that they now are unable to use. The use of situational irony in this story serves to highlight their self-sacrificial nature and reinforce the message of what true love is in terms of Christmas gift giving.