The obvious meaning of underlying refers to something beneath something else. But the word carries a more subtle meaning, that of something hidden but important, something that shapes the meaning or effect of something else, without being explicit itself.
Consider the adjective underlying as referring to a "subtext," which is something hidden. An example is sarcasm, when a person says one thing but means the opposite. In theater, an actor develops subtext for his or her character to establish an underlying reason for what that character says and does. Life is full of underlying reasons we do things. Worry over a grandparent's illness might be the underlying reason a child fails a test. (Then again, maybe she just didn't study.)