How to get back all iMessages into newly installed OS X El Capitan? This is not related to the broken Messages app. 

After I formatted my drive, installed clean El Capitan and received a code on my iPhone I can send iMessages from my Mac. Messages are received by my contacts and I can also see them on my phone.

The problem is that I would like to see all existing (previous) messages I have on my phone, again in my Messages.app. That is, everything I wrote before formatting the drive.

I haven't made any backups. I thought that simply everything will be synchronised like Contacts etc.

Currently only newly created messages are visible. Since yesterday, I've been reading a bunch of topics. Is this normal? Or am I missing something? As I said, it doesn't look like a sync issue since the new messages are working.
Since you formatted your drive, your old messages will no longer exist on your computer. Unfortunately, iCloud does not sync iMessages with OS X as of this time. You also can't sync up using iTunes either. It's possible that you could extract them from your phone, but you wouldn't be able to simply put them back into the app again.

In the future, should you reformat, you should backup your user's library folder as this contains most customizations you have set for your apps, along with the iMessages you had before.

Even if you had made a backup, however, the structure of messages will likely change over time and I know some folks even from Yosemite were unable to simply pass these files from a backup to El Capitan.