화장하다

I was looking up 화장하다 on naver and found that it means both cremate and to put on make-up.

I was wondering if there is any reason that they are spelt the same or if there is a link between these words in Korea or is it just coincidence they are spelt the same?