Technically speaking, it always matters! While most people grab a bag of all-purpose flour and call it a day, it can actually be beneficial to get a bag of flour that’s specifically tailored to your needs. If you want to try your hand at baking bread, then maybe getting a flour specifically made for baking can help you achieve the best results. And if you’re making a cake... well, get cake flour!
If you’re following a specific recipe, get whatever it indicates. They always know best and you’ll achieve better results if you follow their instructions.