@heemayl answer tells you how to get the source code but in case you are wondering
how come the package is installed without using the source code?
It is because Ubunutu does not build packages from source and instead downloads precompiled binaries.
A distro like Gentoo Linux however would download the source and build a package locally.