If the core of the gas giant was square for instance, would the planet be square too?
Planets are round because gravity pulls them into that shape.
Imagine if there was a very high tower of gas on Jupiter. The gravity of Jupiter would pull it down. A mountain of gas would similarly be pulled down. The corners of a cube are essentially very high mountains and these would be pulled down.
Gravity pulls everything towards the centre of the planet, and the most efficient way to get the matter as close as possible to the centre of the planet is a round planet.
Due to the rotation of the planet, the shape isn't perfectly spherical, it bulges around the centre of the planet due to centrifugal forces.
In fact this applies to solids too. At the size of a planet, nothing is truly soild, gravity will crush solids to form a sphere. You couldn't have a solid planet that was a cube either.
It is also impossible for the core of a planet like Jupiter to be square, for the same reason: gravity will pull it into a round shape. If by some strange magic the core was a cube, it wouldn't have much effect on the gas. For a planet with a thin atmosphere, the corners of the cube would stick out, and the shape of the atmosphere would be "odd". For a planet like jupiter with a thick mantle of gas, the shape of the core is irrelevant; it is too small to affect the shape of the planet. But remember that cubic cores are simply impossible.