I wouldn't say it is the "harm" that makes ecstasy desirable.
Ecstasy's 'active ingredient' is a compound called MDMA. When taken it increases the brains production of serotonin. Serotonin regulates our mood and happiness, so producing more of it increases a users happiness.
Ecstasy users would probably say that it is enjoyable because it heightens all sensations. Particualrily taste, touch and smell and of course hearing.
The name 'ecstasy' exaggerates MDMA's effects somewhat, in the United States it used to be called 'empathy' which is probably a more accurate name.
People who take ecstasy, often report feeling that social barriers are broken down, and being able to talk uninhibitedly to strangers. And if taken whilst listening to 'loud repepetive beats' a compelling desire to dance!