con-: together, with
sist: derived from Latin "sistere", meaning "stand"
So consist means:
A is B of standing together.
A is B of consisting.
as time goes on, it turns slowly into：
A consists of B.
So "consist of" turns into the meaning: "to be formed from two or more things".
A stands with in (within) B.
So "consist in" means “to exist in or depend on something”.
Evolution of usage
A building is bricks of standing together.
A building is bricks of consisting.
A building consists of bricks.