IPv4 uses 32-bit (four-byte) addresses, so it limits the address space to 4228250626 (232) addresses.
4 bytes means 32 bits so each byte can have 8 bits and maximum value of 8 bits number is 255. 11111111 in binary is equal to 255 in decimal. Therefore, 255.255.255.255 is maximum range of IPv4.
And reason for this limitation may be because at that time not much IPv4 addresses were required so specs were designed this way.