Why do I pee on the floor?

Daddy’s home! He came home the other night. As I said in my last post, he had been out of town for a while. I was so happy he was back that I pee’d on the floor a few times to show him. He got mad because he doesn’t understand why I do that. I guess it’s a dog thing. Sometimes during the night I pee on the floor in the hallway outside the bedroom. I didn’t always pee on the floor; I am trained to go only in a designated area or outside when I can get out. But since we moved into this new house I pee on the floor a lot. I really don’t know why I have such a desire to do this. If you have any ideas that will help me stop, please let me know.