Let $p:X\to S$ be the unique map from a (locally compact) topological space $X$ to a point. Since $\underline{\hom}(\underline{\mathbb{Z}},-)$ is the identity functor, we have that $\Gamma(X,-)=\hom(\underline{\mathbb{Z}},-)$ and so $$H^i(X,-)=\operatorname{Ext}^i(\underline{\mathbb{Z}},-)=\hom_{\mathsf{D}(X)}(\underline{\mathbb{Z}},-[i]).$$ We can then use the adjunction to write this as $H^i(X,-)=\hom_{\mathsf{D}(S)}(\underline{\mathbb{Z}},p_*- [i])$. In particular, we have that $H^i(X,\underline{\mathbb{Z}})=\hom_{\mathsf{D}(S)}(\underline{\mathbb{Z}},p_*p^*\underline{\mathbb{Z}} [i])$. The same kind of reasoning shows that $H^i_c(X,\underline{\mathbb{Z}})=\hom_{\mathsf{D}(S)}(\underline{\mathbb{Z}},p_!p^*\underline{\mathbb{Z}} [i])$.
Now, most references on Verdier duality would call $\hom_{\mathsf{D}(S)}(\underline{\mathbb{Z}},p_*p^!\underline{\mathbb{Z}} [-i])$ the $i$-th homology of $X$. I get that this is defined precisely in a way that recovers Poincaré duality in its general form. Is there more to it? Why does this deserve to be called a homology group?