Because B is a row reduced matrix not the column reduced. If you want to find the basis for the column space, first of all reduce B to a column-echelon form C (say). Then the non zero columns of C will form a basis for the column space.
e.g. Consider the row-echelon matrix `B=[[1,2,0,3,4],[0,1,2,4,0],[0,0,0,0,0],[0,0,0,0,0]]` .
Now we see that there are five non-zero columns. But they are not linearly independent and hence cannot form a basis at this stage.
Now we convert this matrix B to a column reduced echelon matrix C.
`[[1,0,0,0],[2,1,0,0],[0,2,0,0],[3,4,0,0],[4,0,0,0]]` `~~` `[[1,0,0,0],[0,-1,0,0],[0,2,0,0],[0,-4,0,0],[0,0,0,0]]` `~~` `[[1,0,0,0],[0,1,0,0],[0,2,0,0],[0,4,0,0],[0,0,0,0]]` `~~[[1,0,0,0],[0,1,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]`
So our matrix C=`[[1,0,0,0,0],[0,1,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]` .
We see that C has only two non zero columns. So these two non zero columns will form the basis for the column space of the matrix A as mentioned in the given problem.
The column spaces of A and U are generally unequal .
Let us consider matrix A=`[[1,2],[2,4]]`
Row echelon form of A,say B=`[[1,2],[0,0]]`
In this example, here two non zero columns, namely`(,)` and `(,)` are linearly dependent.So will not basis for column space.