It's the difference between and expression (or formula) and a character string. They are not the same thing.
You can start with a character string and make it into a formula though:
myvar <- "ridership"
chr_f <- paste(myvar, "~ .")
str(chr_f)
#> chr "ridership ~ ."
f <- as.formula(chr_f)
str(f)
#> Class 'formula' language ridership ~ .
#> ..- attr(*, ".Environment")=<environment: R_GlobalEnv>
Created on 2022-05-10 by the reprex package (v2.0.1)
then you can use
bt_reg_fit <- bt_reg_spec %>% fit(f, data = Chicago_train)