There are 3 possibilities for the salvation of mankind. God could save everybody, God could save nobody, or God could save somebody. Only in one of those 3 possibilities can God truly display all of His attributes and receive the most glory.
God is perfect love, God is perfect mercy, God is perfect grace, God is perfectly holy, God is perfectly just, God is perfectly righteous, God is all-powerful, God is all-knowing. God has decided to demonstrate His attributes and His power through the salvation of mankind.
God is most glorified when He demonstrates all of His attributes in His purposes, His decrees, and in His will that He carries out through His creative work. So, how do we know which of the 3 possibilities are correct? Well, both Scripture and life experience teach us that the answer is that God saves somebody. He does not save all and He saves more than none. So, the answer is that He saves some.
By saving some, all of God's attributes are on display for the whole world to see and He receives the most glory in saving some. Whether you are a Calvinist or an Arminian and regardless of your view on election (conditional or unconditional), the fundamental purpose of salvation is for God to save some rather than all or none. This much is abundantly clear.
In saving some, God displays all of His attributes. In those He passes over and does not save, He displays His power, His wrath against sin, His justice, and His holiness. In those He does save, He displays His love, His grace, His mercy, and His kindness towards those who believe.
God receives glory from regenerating, justifying, sanctifying, and in the future, glorifying His elect people. God also receives glory in executing righteous judgment against those upon whom His wrath is against; those who love their sin, choose their sin and die in their sin.
Man, if left to Himself would die in his sin and every person would be eternally separated from God. This means that nobody would be saved. If this were the case, then God while displaying His holiness, righteousness, power, and justice, would never be able to display His grace, love, mercy, and kindness.
If every single person were to be saved, then only God's love, mercy, grace, and kindness would be on display and His justice, holiness, and righteous demands against sin would never be displayed.
So, in saving some God's displays all of His attributes to His creation and everyone is held accountable for their sin to a God who is at all times merciful, graceful, loving, just, righteous, holy, and all-powerful.