There's a lot of these little artificial things in JS that are designed purely to make the language easier to read and type.
Other popular examples: want to copy an array? Instead of typing something unpleasant like
const copy = [];
for (let i = 0; i < arr.length; i++) {
copy.push(arr[i]);
}
you can just type
[..., arr]
Or if you want to declare a bunch of constants that are coming from some object you don't have to type
const dog = pets.dog;
const otherDog = pets.dog;
const someOtherDog = pets.dog;
const cat = pets.cat;
const tarantula = pets.tarantula;
because you can just type
const { dog, otherDog, someOtherDog, cat, tarantula } = pets
Or here's an unpopular example nobody I know uses:
Instead of typing
const dogsName = "Cat";
const dogsBreed = "idk";
const goodDogStatus = true;
you can type
const dogsName = "Cat",
dogsName = "idk",
goodDogStatus = true;
It doesn't add anything new to the language. Under the hood the transpiler or web browser or whatver has to know how to interpret the new way of typing. You can type things the old way if you want to, and there're probably developers who think you should. But it's just easier for developers when you can use these nice kinds of notation.