Because member variables get initialized when the script instance is created. This happens before your node entered the scene tree, so you cannot query child nodes or parents at this time.
To solve this, use
onready var. This will make your initialization code run when the node and its children will have entered the tree.