Those numbers are pretty much irrelevant. Canadians arent evenly distributed throughout the country (nor throughout Ontario. That province is empty other than a tiny corner of it), the overwhelming majority of them live in a few areas that are quite population dense (i.e. metro-Vancouver area, Edmonton/Calgary axis, and the corridor from Toronto to Montreal.
Besides, Canada used to have a much more extensive train network back in early 1900s when the population was a tenth of what it is now.
Canada could have functioning train networks if we wanted them.
Rail networks are no longer a government priority in Canada because of planes and cars. We've kept some of the rail tracks, but theyre mostly just used for freight transport, not for people.
Not surprising that Germany has a better train network.