@Semyon: please join the mailing list https://mail.python.org/mailman/listinfo/matplotlib-users so you can post un-moderate.
This appears to be a long standing issue with setuptools / pypi . Currently setuptools does not add the required meta-data to the sdist  which if we upload the sdist first sets the singular (and immutable) metadata from that artifact (which is missing
'requires_dist' ). The subsequently uploaded wheels carry their own meta-data which (I believe) is what the solver actually uses to ensure that the run-time dependencies (
'install_requires' to setuptools) are installed.
I am not clear if this meta-data is used for anything or what the practical consequences of it being wrong are (other than messing up school projects). I was able to find a number of issues on github noting that the meta-data was missing, but no mention of any consequences.
I would suggest looking at the dependency graph extracted from one of the down-stream packagers (such as conda-forge, fedora, arch linux, debian, …). I expect those graphs to be more correct (within their set of build artifacts) and to also correctly capture the non-Python dependencies of Matplotlib.