Executing a = [a,b] means append b to a, thus vector will eventually be a matrix where each column is the row-wise sum of something'.
More concretely: suppose something' is this matrix:
something' = [ 1, 2; 3, 4 ];
Then sum(something') is:
othervector = [ 3 ; 7 ]
And initially vector is empty, so this sets vector to
vector = [ 3 ; 7 ]
Suppose we repeat with a new something' consisting of
[ 5, 5; 5, 6 ]
Then sum(something') is:
othervector = [ 10; 11 ]
And now we augment this to vector using vector = [vector, sum(othervector)]:
vector = [ vector, [10; 11] ] = [ 3, 10 ; 7, 11 ]