okay. it works like this.
Lets say you want to attack an enemy ship, but you don't want to endanger your ship in the process. So since weapons become less and less effective as distance to target increases you say to your self, i want a way to deploy a weapon system away from my ship, oh lets create a small ship with a pilot in it and put our big bomb on it and call it a bomber.
Hm that seems logical, lets see how we can expand on that idea, maybe put in a cool commando squad in that small ship and try to capture the enemy ship without destroying it and you end up with a boarding ship. But what about multipurpose small ships, that can do more cool things and even, you guessed it, counter the bombers or boarders, lets call it a fighter.
So now we have a small bunch of ships that can work with my bigger ships to a greater advantage, by being able to execute cool tactical tricks, like attack from multiple vectors, exploit weaknesses in ships or fleets.
Now a bunch of small 1 or 2 man ships or drones need higher coordination to work and are skill intensive and i dont want them to die because their pilots are hard to replace or their systems are really expensive, so i will create a ship role that coordinates, repairs, carries, or even has additional ships to recover the pilots in case they eject. I will call them carriers.
So unless for some weird sci-fi reason, having multiple vectors of attack, tactical flexibility, boarding capability and general all purpose utility is not recommended in stellaris there will of-course be small ships in stellaris.