It happen because your port pins has a default value (reset value). I assume that you are simply setting the pin as output and nothing else. Have you ever wondered what will be the value or voltage at that output pin, there should be some voltage no??
Go through your controller datasheet, that default value will be zero.
If the pin is generating zero voltage, it can never show high when you measure!!