If we could inspect the full output of those two commands we would likely find that
apt-get install latex2html installed many more packages (dependencies of
apt-get remove latex2html removed (only a single one,
It’s easy to see that the sum of a set of positive numbers A is larger than that of a set B which is a true subset of A. More concretely: the package
latex2html (set B in the analogy) occupies less space than the same package plus all of its dependencies (set A, if there was at least one unsatisfied dependency during package installation).
If you want to remove all unused1 dependency packages you can use:
sudo apt remove <PACKAGE>
sudo apt autoremove
sudo apt autoremove <PACKAGE>
All these commands will ask for confirmation if Apt intends to do something beyond what you instructed it to do directly, e. g. install or remove a different package on top of the ones specified on the command line. You can also ask
apt to only show what it would do and not actually do it via the command-line options
--no-act (all equivalent).
1 In this context "unused" means that no manually installed package depends on it (directly or transitively). "Manually" means that someone or something instructed Apt to install this particular package directly, i. e. via
apt-get install <PACKAGE>, Software Center, or some other package manager interface, and that it was not merely selected for installation as a dependency of a different package by Apt.