In statistics, a histogram is a graphical representation of the distribution of data. It is an estimate of the probability distribution of a continuous variable.
The emphasis is on continuous variable, as opposed to discrete variable.
In the top histogram you've presented, the X axis is time, which is continuous in this context (it is divided to 10 minute bins, but the original data could have been in resolution of seconds, milliseconds, nanoseconds and so forth).
The way such histogram is derived is they probably had many samples, say 50,000 visits. It makes no sense to present a bar per visit time - the data will be useless; like if 900 users spent 1:42, nobody spent 1:41, and 800 spent 1:40 on the site. The average is much more important. So in this case, the samples were ordered and averaged into bins. In the graph you've provided, each bin represents 10 minutes.
Since the X axis is time, had they left any gap, it could mean that nobody spent time between 10 and 11 minutes. But this is not correct.
You could, in theory, replace this histogram with a bar graph, where the first bar would have an X value of 0-10 minutes, the second 10-20 minutes, and so forth. But the problem would be that you'd have 10 minutes sealing one bar and opening another (which makes no sense). So you'd have to change it to 00:00-10:00 minutes for the first bar, 10:01-20:00 minutes for the second bar, and so on. Which would be valid if your samples are down to a second resolution (if not, you may have to use 10:01:01 or all sorts of long time formats). It is much easier to show this on a histogram.
In the bottom graph, the X axis is months - clearly a discrete variable.
To generate this bar graph, they simply count visits to the US each month - there is no problem putting spaces on the X axis as it isn't continuous. The visual representation is valid.