Question: Given that hubs are essentially the same as switches, as far as I know, except they share bandwidth between all connected devices, while switches do not, resulting in faster connections. I am simply wondering if there is any reasonable purpose for hubs in modern networks.

Answer: 
For the most part, no. Hubs are also known as *repeaters* - meaning that they basically echo whatever is coming **in** to a given port **out** all other ports in the domain. The idea is (or, more properly, **was**) to replicate the behavior of a shared piece of coaxial cable, meaning that the individual hosts had to assure that only one member of the LAN was transmitting at a given time (...managing this is where the notion of collisions and CSMA/CD comes in).

Switches, in turn, a actually multi-port bridges. Switches learn what hardware addresses are on what ports and then (ideally) only transmit traffic to the host(s) on a particular port. 

As a really crude example, imagine 4 hosts on a network: A, B, C and D. On a hub a conversation between A and B is seen, in full, by C and D. As such, if there's a second conversation between C and D it is now sharing the same bandwidth with the traffic being sent back and forth between A and B. In contrast, on a switch these conversations are kept entirely separate - thus allowing both sets of hosts to communicate at full speed without effecting one another. This (among other behaviors) *massively* improves overall scalability and performance on most networks.

The other issue here is that as Ethernet speeds have gotten faster the basic mechanisms mentioned above (collision detection) have actually disappeared. In 10 and 100 megabit there were absolutely modes for half-duplex (i.e. single host transmitting at a time) communication while in gigabit it was largely deprecated/unimplemented (there were some 10/100 hubs that *bridged* to FDX gigabit connections but very few - if any - gigabit hubs) and in 10 gigabit (and beyond) it's nonexistent (...meaning a switch is now the only option). 

So is there a reasonable purpose for a hub nowadays? I'd say generally not. Some gigantic portion of modern equipment doesn't even *support* half-duplex at this point, and 100M is becoming fairly uncommon in its own right. There used to be an argument for hubs as a good way to easily monitor traffic without the use of SPAN ports or taps, but that was a fairly uncommon use-case even 15 years ago.
In general, no, there's no reason to use a hub over a switch, but they do still have a purpose in some special cases. One case is if you need to capture traffic to a host but the host can't run a capture utility itself and the switch it connects to also can't do a capture or span port. In this case, you could connect a hub between the host and switch, and connect another device to the hub that can do the captures. For example, plug a laptop into the same hub, with Wireshark installed on it, and perform the capture there. Due to the way hubs work (versus how a switch works) all packets are sent out all ports, so you will be able to see all traffic passing through the hub destined to or sourced from the server you need to capture traffic for.