The sight of the ephod and teraphim suggested the notion of inquiring of God.
Related Commentaries of Judges 18:5
Judges 18:5
5 And they said unto him, Ask counsel, we pray thee, of God, that we may know whether our way which we go shall be prosperous.