The Monoid instance for Maybe types has been defined as [src]:
instance Semigroup a => Monoid (Maybe a) where
mempty = Nothing
it thus requires Int or String to be instances of the Semigroup type class. Since a String is the same as type String = [Char] and thus a list of Chars, this is the case, indeed we see [src]:
instance Semigroup [a] where
(<>) = (++)
{-# INLINE (<>) #-}
stimes = stimesList
so it will append the two lists, and for a Maybe this means [src]:
instance Semigroup a => Semigroup (Maybe a) where
Nothing <> b = b
a <> Nothing = a
Just a <> Just b = Just (a <> b)
stimes = stimesMaybe
This thus means that for two Maybe Strings, the neutral element is Nothing and the binary operator will append the two strings wrapped in Just … data constructors if these are both Justs, the Just one if one of the two is a Just, or Nothing if both items are Nothings.
This is not the case for an Int, indeed. For integers there can be multiple Monoid instances, for example ⟨ℤ,+, 0⟩ or ⟨ℤ,×, 1⟩.