When you freeze a solution that’s high in sugar, the crystals that form are not crystals of frozen Pepsi, but of pure water. Because that water is no longer in the solution, the remaining solution (the stuff the crystals are floating in) is now even higher in sugar concentration. Because of this, it’s gooy. That concentrated solution is now even harder to freeze, because all that sugar lowers its freezing point, but if you get it even colder, more water will crystallize out and leave behind a still stronger syrup. This will continue until the syrup is so concentrated that your freezer isn’t capable of freezing it.