I have to design a help centre for my company's product.
I noticed that many sites place their help centres on a separate domain. Why do they do this?
Does it make UX better for users?
Depends on the type of product you're working on (maybe add it into your question for other people). From my experience in Ecommerce, sending users to a separate domain can be risky as they are being forced away from your site which is where all the money is generated! (using my marketing brain here). In terms of UX, being sent off-site can be an inconvenience to many users as you are creating extra steps in their journey to get back to their original path.
Saying this, if your help center is going to be huge and your product allows for sending people off-site, then a separate domain will prevent the 'main' site from being too cluttered.
Couple of extra ideas for you:
It is a common practice to put the helpcenter on a subdomain. Using a different top level domain is less popular and not recommended. -See @sclarke's answer.
There are two reasons combined. Typically the main website or shop runs with a CMS like WordPress and is istalled on the own server. The helpcenter is a SaaS, for example zendesk. But as the business owner you don't like to use a generic zendesk subdomain to handout to your customers for the helpdesk. So you add a new subdomain and map it to your zendesk account via DNS. -BTW: you'll see this for newsletters also.
The other reason is more UX relevant. You can print "help.example.com" on your product, on your manuals, put it into emails or simply tell this your customers via phone. This let your customers/users dive into the helpcenter directly, instead of visiting your mainpage and searching for the link to it.
Even if you don't use a SaaS but integrating it into your website you should use a subdomain and redirect it to the relevant subpage.