Comprehension scheme: for every formula $\phi(s,t)$ with free variables $s$ and $t$, set $x$, and parameter $p$, there exists a set $y = \{u \in x : \phi(u,p)\}$
Question: why not "for every formula $\phi(s)$ with free variable $s$, set $x$, there exists $y = \{u\in x: \phi(u)\}$?
I don't understand why a second variable is assumed and what role $p$ plays
thanks!
You want to have access to parameters. For example, if you want to talk about something definable in the real numbers, the language of set theory does not have access to the language of the real numbers or to the real numbers themselves.
Moreover, there is no "specific set" which is $\Bbb R$, instead we prove theorems about a variety of structures in a specific signature, and what $\sf ZFC$ proves is that every such structure will satisfy such and such statements.
So if you want to say, for example, that $x$ is the unique real number which is the length of the arc from $-1$ to $1$ in $\Bbb R^2$, that every point on that arc is of distance exactly $1$ (in simpler terms, $x$ is exactly $\pi$), then you need to specify what are the real numbers for this instance of the discussion.
This is the parameter $p$. It holds inside it the whole language, interpretation and so on.
And this is just one example, of course. But if you want set theory to be a foundational theory, then you need to at least make it easy for people to be able and define sets "in everyday mathematics" using set theory. And allowing parameters is the easiest way to ensure that this is possible.