It makes the variable read only. From
readonly: readonly [-aAf] [name[=value] ...] or readonly -p
Mark shell variables as unchangeable.
Mark each NAME as read-only; the values of these NAMEs may not be
changed by subsequent assignment. If VALUE is supplied, assign VALUE
before marking as read-only.
-a refer to indexed array variables
-A refer to associative array variables
-f refer to shell functions
-p display a list of all readonly variables and functions
An argument of `--' disables further option processing.
Returns success unless an invalid option is given or NAME is invalid.
$b would still return "a". As an example:
$ readonly b=1
bash: b: readonly variable
$ echo "$b"