House flies and bluebottles need just a fragment of decomposing food or whatever to lay their eggs on. A cat or dog could easily carry a maggot into the house.
It's nothing serious, so don't worry .. our cat is extremely long haired had some maggots appear on her rear end recently. She could quite easily wander anywhere in the house and a maggot drop off of her. That would leave us with a chrystalis we didn't want.
You should have heard the ear bashing I got when the wife returned from work to find the cat with a shaved rear end.
https://www.google.co.uk/?gws_rd=ssl#q=do+house+flies+lay+eggs