If a good person with good charecter says to his father 'you are not my father', will he continue to be a good person after denying his father? No. So Imagine denying one own Creator Allah the Almighty. All these laws of Islam is set by Allah , sometimes it may not be clear to us, but remember Allah knows everything and indeed only He knows whats best for us.