You can take more control on Maxima installation by using special options to specify that you do not want to get recommended and suggested dependencies:
sudo apt-get install maxima --no-install-suggests --no-install-recommends
For example on minimal 20.04 LTS installation it will result in:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
texmacs maxima-doc xmaxima maxima-emacs wish
Recommended packages:
maxima-share gnuplot-x11
The following NEW packages will be installed:
maxima
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 6928 kB of archives.
After this operation, 53.5 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 maxima amd64 5.43.2-3 [6928 kB]
Fetched 2494 kB in 1s (3163 kB/s)
Selecting previously unselected package maxima.
(Reading database ... 62984 files and directories currently installed.)
Preparing to unpack .../maxima_5.43.2-3_amd64.deb ...
Unpacking maxima (5.43.2-3) ...
Setting up maxima (5.43.2-3) ...
Processing triggers for man-db (2.9.1-1) ...
Analyzing the above output we can see that gnuplot-x11
may be a reason to install X11 stuff.