It is a matter of time. Crystallization processes can occur more easily when the rock is kept at a certain temperature during a long time. Because of that, well-formed and well crystallized minerals will appear in intrusive igneous rocks (such as granitoids). On the opposite, when a rock spreads rapidly over the Earth's surface, the temperature decreases rapidly, keeping the minerals from forming. A homogeneous paste will form, without any (or few) minerals in it. It is the case for volcanics rock