How does it cost them? Do you mean in that a free service isn't being used by non-Apple product owners/users? Or that it's costing them sales of their Apple products?
It's costing in usefulness. iMessage loses value if no one uses it, and outside of the US pretty much no one uses it, so it's useless.
There are an estimated 900 million iPhone users. If about 1/9th of the world is using those phones. Twitter has fewer users and remains pretty relevant.
Being installed by default doesn't make them a user
Just because the app is installed doesn't mean people actually use it as their main chat app.
All my EU contacts that have an iPhone use iMessage. Companies(100k+ employees) in the EU, that have an iPhone as a company phone, use iMessage.
Well that is certainly new to me. When I lived in the EU I knew precisely no one for which iMessage was the main mode of communication.
Usefulness to whom? The hundreds of millions of iOS users worldwide seem perfectly happy with it. I count myself in it.
Far from all the iOS users actually use iMessage as their main chat app.