Philosophy involves how one lives. And that includes how one is to think and behave. Ancient mystics believed in and/or promoted thoughts on what kinds of beings existed and had influence over the world. And due to the proposed existence of these beings (an ontology), various behaviors were recommended and often demanded.
The existence of God, for example, is an ontological issue. The origin of the belief in God came from someone choosing an ontology inclusive of such a being/existence. The same is true concerning all of the gods, all of the laws of physics, all ethics, literally all thought. And with any thought comes belief and with any belief comes recommended behavior => religion.
There can be no religion without a philosophy within it, although there can be a philosophy without a religion associated with it.
Exactly.
Thought of any kind doesn’t begin without inherent philosophizing. Even animals and insects are prewired with innate philosophies, “eat - drink - and get laid”.