Does 'stream of consciousness' writing have a place in literary fiction?

I only ask because that's how sections of some books appear to me; as though the writer was in 'a zone' and poured out all of their thoughts and ideas about an issue in a great gush. Reading these paragraphs feels to me like being in someone's head; intensely personal, enlightening, hard to follow, fresh, and often accompanied by a feeling of a truth spoken or a 'big' human condition being explored, revealed or resolved. To put it another way, reading this kind of writing usually gives me an 'aha' moment.

I know straightaway when I read 'it', and I like 'it', but I'm having a hard time naming what exactly is going on. Stream of consciousness or does 'it' have another name?

I'm not sure if this makes sense or is very clear but I'd welcome any thoughts or comments. I expect the process of trying to clarify will help me understand .