Docblock comments can also be inspected with reflection [3] but have a much looser syntax, so it was up to you to parse them. Where as you can create a new instance of an attribute directly from the reflection object [4]
In your example Symfony uses it to build up the list of HTTP routes by looking through all your controllers for #[Route] attributes. Generally that's done once and then cached, at least in production.
Personally I try to avoid using them, but they're definitely not comments. More like metadata you can attach to classes/methods/properties/parameters then use however you want.
[1]: https://www.php.net/manual/en/language.attributes.syntax.php
[2]: https://www.php.net/manual/en/reflectionclass.getattributes....
[3]: https://www.php.net/manual/en/reflectionclass.getdoccomment....
[4]: https://www.php.net/manual/en/reflectionattribute.newinstanc...