Once common reason why the Serial Number is not valid is because your iPhone may have had an issue (Previous Owner) and received a replacement iPhone. After that, the previous owner may have not returned the iPhone to Apple and sold it.