How many devices are we talking about on this network? The usual reason for having a mask other than 255.255.255.0 is to have more than 255 devices on the network. Think about a large event. There are 1500 people with phones trying to use the WIFI. The DHCP server has to be setup to allow 2048 devices to get IP addresses. The mask is then set to allow that larger pool of IP addresses.
A more restrictive subnet mask is used to more efficiently allocate IP addresses. If you only need to be able to directly access 6 devices, you can set the subnet mask to only allow that. Then the owner of the limited IP space can sell the next 7 addresses to someone else.
This calculator is pretty good for showing what IP addresses are in a mask --
https://www.subnet-calculator.com/