Cargo cult coding
And in the case of PHP (which is perhaps also a problem in itself, although I acknowledge that a lot of work has occurred in recent years to try to clean up some of the worst features of the language), you only have to look at how many books and web tutorials were still churning out advice about interacting with databases using the mysql_* functions (rather than the newer, more featureful, safer, mysqli_* functions or PDO) for years and years, and all too often even *after* advance warning of the deprecation of the mysql_* functions had been announced…