If you look at the beginning of the original Portal game, GLaDOS opened portals for us.
While the portals were opened on plain white surfaces, how could GLaDOS do it without portal gun? Portals weren’t some in-built capability of walls that GLaDOS could manipulate using code and that’s why she needed us to further her agenda (only a human could use portal gun due to its design).