It's definitely profitable in terms of support contracts.
But make no mistake, any place that is still running these legacy systems like commercial Unix (HPUX, AIX), OpenVMS, IBM i (aka OS/400 aka System/38) or mainframes is only doing so because they have to.