Writing a safe migration can be daunting. Numerous articles, including ours [1], have been written on the topic and a few gems are trying to address the problem. Even for someone who has a pretty good command of Postgres, remembering all the subtleties of explicit locking is not a piece of cake.
Active Record means developers don't have to be proficient in SQL to interact with a database. In the same way, Safe PG Migrations was created so that developers don't have to understand the ins and outs of Postgres to write a safe migration.
[1] https://medium.com/doctolib/stop-worrying-about-postgresql-l...