Why did my positions in my List "flip"?

I have a method that sets up the positions I use later to add gameobjects to:

void SetupGrid(){
		int sectionX = (Camera.main.pixelWidth)/6; 
		int sectionY = (Camera.main.pixelHeight)/6; 
		int i =0;
		for (int y = 0; y < gridY; y++){
			for (int x =0; x < gridX; x++){

				allies.Add(new GameObject());
				positions.Add (Vector3.zero);
				positionsScreen.Add (Vector3.zero);
				positions _= Camera.main.ScreenToWorldPoint(new Vector3(sectionX*(x+1),sectionY*(5-y),0));_

positions = new Vector3(positions_.x,positions*.y,0);

* }*
* }*
* foreach (Vector3 element in positions){*
* Instantiate (test,element, Quaternion.identity);*
* }*
* AddUnits();*

* }*
The AddUnits works as intended to add my gameobjects, starting from top left and ending bottom right. This is what I want. However, when I use the same positions to add GUI Rects, they’re added in a different direction, starting from bottom left and ending top right. Why is this happening? The code to add Rects is this:
void OnGUI(){
* Event e = Event.current;*

* if (canGenerateText == true){*
* for (int i = 0; i<allies.Count;i++){*
positionsScreen = Camera.main.WorldToScreenPoint(positions*);*

GUI.Box (new Rect(positionsScreen_.x - (width/2), positionsScreen*.y-(height/2), width, height), textbox);

The screen positions aren’t calculated in the same way as world positions.

In world positions, the higher you go, the greater the value.

Conversely, in screen positions for Rect, you go from top to bottom, left to right. Because of this, you need to invert the Y position on the GUI elements to match the positions on screen (i.e. Screen.height - Ypos).

If you think that’s crazy, consider that the Unity developers had no choice in having to handle both OpenGL and Direct3D standards for screen calculations. OpenGL draws the screen with (0, 0) at the bottom left corner, while Direct3D’s screen coordinates begin in the upper left corner. Either way, someone has to decide on something for the framework, but then it’s (in many cases) best used as-is. (And before anyone tries to correct me on that, consider why Unity has so many technically-still-supported, deprecated variables and functions… backwards compatibility is very important to survivability)