How does `apt-cache` work?

Please note that https://www.ctan.org/pkg/href returns 404. So you are probably using wrong package name. But hyperref package exists.

If you read man apt-cache locally or online you can see the following:

search regex...
search performs a full text search on all available package lists for the POSIX regex pattern given, see regex(7). It searches the package names and the descriptions for an occurrence of the regular expression and prints out the package name and the short description, including virtual package names. If --full is given then output identical to show is produced for each matched package, and if --names-only is given then the long description is not searched, only the package name and provided packages are. Separate arguments can be used to specify multiple search patterns that are and'ed together.

So you can try to use apt-cache search href latex or some logical commands. But real thing which matters is that apt-cache knows nothing about package contents.
LaTeX packages are usually have *.bst, *.sty files for their definitions.

To search package contents for example for hyperref.sty you need to use other tools:

  • locally - use apt-file:

    sudo apt-get install apt-file
    sudo apt-file update
    

    to get something like

    $ sudo apt-file search hyperref.sty
    latexml: /usr/share/perl5/LaTeXML/Package/hyperref.sty.ltxml
    texlive-lang-arabic: /usr/share/texlive/texmf-dist/tex/xelatex/bidi/bidituftehyperref.sty
    texlive-latex-base: /usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
    texlive-latex-base: /usr/share/texlive/texmf-dist/tex/latex/hyperref/nohyperref.sty
    texlive-latex-extra: /usr/share/texlive/texmf-dist/tex/latex/hobsub/hobsub-hyperref.sty
    texlive-latex-extra: /usr/share/texlive/texmf-dist/tex/latex/interfaces/interfaces-hyperref.sty
    texlive-latex-extra: /usr/share/texlive/texmf-dist/tex/latex/zref/zref-hyperref.sty
    texlive-latex-recommended: /usr/share/texlive/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
    

    or with regexp syntax:

    $ sudo apt-file search --regexp hyperref.sty$
    texlive-lang-arabic: /usr/share/texlive/texmf-dist/tex/xelatex/bidi/bidituftehyperref.sty
    texlive-latex-base: /usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty
    texlive-latex-base: /usr/share/texlive/texmf-dist/tex/latex/hyperref/nohyperref.sty
    texlive-latex-extra: /usr/share/texlive/texmf-dist/tex/latex/hobsub/hobsub-hyperref.sty
    texlive-latex-extra: /usr/share/texlive/texmf-dist/tex/latex/interfaces/interfaces-hyperref.sty
    texlive-latex-extra: /usr/share/texlive/texmf-dist/tex/latex/zref/zref-hyperref.sty
    texlive-latex-recommended: /usr/share/texlive/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
    
  • online by visiting https://packages.ubuntu.com and searching for hyperref.sty - it is contained in texlive-latex-base Ubuntu package.