Having carried guns together and visited brothels together—those are the ties that bind strongest.
Maitreya Buddha definitely never had the chance to carry a gun with Ji Changsheng, but sharing a secret together might actually be an even stronger guarantee of alliance.
Maitreya Buddha certainly doesn't know that Li Changxi has her eyes set on Spirit Mountain right now, so in his view, Ji Changsheng is his natural ally. And when his little secret falls into Ji Changsheng's hands, it will make Ji Changsheng more inclined to help him, even to the extent that Ji Changsheng might start entertaining thoughts of controlling him.
In this way, the assistance he receives would be even greater.
From Maitreya Buddha's perspective, everything is perfectly fine, so he feels completely at ease as he leaves. The only oddity is that Ji Changsheng has something to discuss with the Three-Burial Mage and Saint Jie Yin, although it certainly has nothing to do with him.