Many verbs just have prepositions that go with them in certain applications, and you just need to learn them. You can "entrar a la casa" or "entrar en la casa," the former being common usage in Latin American.
Like rspreng said, you have to remember not only entrar, but the whole term "entrar a ---- entrar en". If it helps, think of the "a" or "en" as describing what you're entering.
I do not think you remember it correctly. There are only two contractions: (1) a + el = al and (2) de + el = del. So both are only for masculine definite article (el) and casa is female. Sure it wasn't for "al hogar". Btw just learning here.