This may be a misunderstanding. They may feel they are copyrighting the image listing not really taking into consideration the image itself. They want credit for the photo in terms of it gets out and people share it, their copyright will be there so they can get the sale of the house. That is really what their focus is.
If you agreed to do work for them and take the images, they may have felt they purchased the rights to them, in which case the copyright would be theirs even though you took the picture. This could be the case if they paid you, or even if they felt it was done in kind. Only way to get around that is by including in the contract that you maintain the rights, and specify what if any copyright representation they would get. Honestly for real estate listings its not worth the trouble, as what was said previously, once the home is sold, the images are really a mute point.
What you may want to do next time is be sure they include your watermark in the image. You may even be able to put a photo taken by XXX in the image somehow. I know some other photographers who do this type of work, and they have credits in the real estate listings overall. That and the fact they were paid to do the work.
I would talk to your friend, as it sounds like you were doing them a favor. Let them know you were happy to help, but you felt that the favor was going to be returned by some type of credit to your work. If they are truly your friend, this conversation should be an easy fix.
Just my thoughts, good luck on this. I posted because something similar happened to me with some band shots.