Clarifying the question
The pathway of glycolysis starts a hexose (glucose), but at a certain point — the aldolase reaction — two molecules of a triose are generated, then interconverted to the same triose, after which the pathway continues to pyruvate, generating net ATP. These triose molecules each carry a phosphate, which, as the poster mentions, prevents them diffusing through the cell membrane, so the hexose precursor needs to carry two phosphates. Thus the question “why is fructose formed?” can be restated as:
“Why is the hexose precursor of the two triose phosphates fructose 1,6-bis phosphate, and not simply glucose 1,6-bis phosphate?”
Short Answer
The chemical structure of glucose is not suitable to form a bis-phosphate compound that can yield interconvertable triose phosphates in the biochemical reactions the cell employs.
Fuller Answer with Chemical Details
First consider the linear and cyclized structures of relevant phosphate derivatives of glucose and fructose:

Glucose 1,6-bis phosphate may be unfamiliar: it is found in cells in low amounts and may have some regulatory function. Inspection shows that, because the aldehydic group is at the 1-position of glucose, a phosphate can only be added at that position after cyclization generates an alcohol there. Once glucose 1,6-bis phosphate has been formed it cannot convert to a straight-chain structure, unlike fructose 1,6-bis phosphate where the ketonic group is in the 2-position. (Hence none is shown.) This is the key point.
Now let us turn to the triose–hexose interconversion, which is necessary for both glycolysis and gluconeogenesis, which ever originated first. This has two requirements:
- That the triose phosphate molecules can react with one another to
form the hexose carbon backbone (easier to consider the reaction in
this direction).
- That if different triose molecules are required they can easily
interconvert from (or to) a single triose.
Requirement 1 is satisfied most easily in biological systems by an aldol condensation such as the aldolase reaction (also found in the Calvin cycle) in which the nucleophilic carbon of an enolate attacks the carbon of an aldehyde.
Requirement 2 can be satisfied by the isomerization of an aldehyde (like glyceraldehyde 3-phosphate) to a ketone (like dihydroxyacetone phosphate).

The fact that a ketone like dihydroxyacetone phosphate has the potential to form an enolate (shown above) explains the particular suitability of these trioses in relation to the aldose reaction:

[Taken from Chemistry Libre Texts.]
The initial product of this reaction is, of necessity, a linear hexose 1,6 bis-phosphate — with the fructose as the hexose as its carbonyl is at C2. After the fructose 1,6-bis phosphate has lost the phosphate at the C1 position it can isomerize to glucose 6-phosphate (with the C1 position free to form an aldehyde) in a similar manner to the triose phosphate isomerization.
So it is not just the symmetry of fructose (noted by the poster in a comment) that is important — but the structure of glucose itself. Glucose 1,6-bis phosphate is not, of course, the only sugar that can become ‘locked’ in its cyclic form. For example, the deoxy-ribose rings in the backbone of DNA cannot linearize because the bases are attached to the C1ʹ where the aldehydic group was originally.