I'm at a computer camp, and I noticed that every single device connected to the network has a different public IP, which really surprised me. What is even more strange is that their public IPs are exactly the same as their private IPv4 addresses. How is this possible?
They own an IP range, and are using the range to directly connect to WAN (Internet) instead of hiding behind NAT (Network Address Translation). Basically, NAT was made for environments lacking enough Public IP addresses for all the machines in the network, so all of them can hide behind a pool of (one or more) Public IP address(es). If you got at least one Public IP address per machine, then using NAT is a matter of choice.
Back in the old days (before the Public Internet came into being in 1991), technologies like NAT were not common, and most operators did not use RFC1918 addresses. They didn't divide the Internet into public and private spaces as they commonly do today.
In the early days, companies grabbed huge blocks of public IPs by reserving entire /8 networks, consisting of 16,777,216 discrete addresses each. The US Dept of Defense owns 13 such blocks. See here for well-known owners of /8 blocks: https://en.wikipedia.org/wiki/List_of_assigned_/8_IPv4_address_blocks#List_of_assigned_.2F8_blocks
Its been many years since blocks of that size have been available to new registrants, due to IPv4 address-space depletion, so technologies like NAT and RFC1918 networks were required to limit the number of public IPs necessary for network access. Large organizations however still hold their blocks, so they are free to use them themselves, or rent them out to others.
This is how the internet is supposed to work.
People started using private address ranges and NAT because the number of spare IP addresses started to get used up. And then people found that using NAT was easier than using a proper firewall despite it not really being for that.
If you can get the IP addresses and configure a proper firewall as required then this is a perfectly good way to work. With IPv6 it will hopefully become more common
Their only limit in the number of IP addresses they own. The public addresses are most likely configured in their router and routed based on the local addresses.
Because of IPv4 address shortage, it is indeed unusual to waste so many public addresses, but I suspect they probably split the load between them for network performance and security reasons. This could be managed through the router's routing table or firewall rules (or a combination of both).
In certain network designs, the public IP used can actually change over time.
It is impossible for a computer to have the same public and private IPv4 address. It is either a private IP, which (according to RFC1918) is in the range 192.168.xxx.xxx, 172.16.xxx.xxx, or 10.xxx.xxx.xxx, or a public IP, which is any other address.
EDIT: Yes, I am aware you can use public IP addresses in your LAN. Nobody does, though, because of standards and the fact that you will not be able to access those addresses on the Internet. I am also aware that there are other address spaces other than public and private, but again, no one uses those and thus you will not encounter them.
It is possible for every computer to have a different public IP address. It simply means that whatever establishment you were at purchased the right to multiple IP addresses and their routers are configured to give one to each computer. You could probably even do this at home if you wanted to.
Assuming what you said about every computer having the same public and private addresses is correct, my guess is that every computer has only a public address. All the establishment would have to do to make this happen is purchase the right to multiple addresses and configure their DHCP server to give an address in the assigned range to each computer.