You're looking at it from a human's perspective, from God's perspective everything God does is to glorify God first and foremost, that includes everything that happens in creation, of course the salvation of His people is included in His glorification, so He provided a way through Jesus Christ...