Why is MATLAB so common in Neuroscience? It is common knowledge that neuroscience -- particularly experimental neuroscience -- uses MATLAB more than any other programming language. I have always just taken this as a given, and pointed to existing toolboxes, legacy lab codebases, and social pressure as the reasons why this continues to be the case, even though concrete reasons to switch are widely known.

I want to go past these general reasons and pin down the exact causes of MATLAB's stronghold in Neuroscience. Things like


file formats that can only be read in MATLAB
acquisition systems that are highly coupled to MATLAB
toolboxes that are widely regarded as the "gold standard" for something
labs or companies that train many researchers on MATLAB and advocate for it
introductory neuroscience programs / textbooks that teach concepts through MATLAB examples


or any other tangible things to point to would be excellent.
I think the major reason is inertia, in the sense that many labs use Matlab, so many Matlab toolboxes are available, so many labs train people in the use of Matlab...

However, as a trained software engineer turned Neuroscientist who has been programming in various languages for close to 30 years, there are several reasons why I actually enjoy using Matlab. One can also make arguments for why it's a good fit for labs filled with people who aren't programmers.

(As an aside, the .mat file format is actually a standard file format called "HDF". So I don't think that file format lock-in is a real reason.)

Things Matlab does well


Very good cross-platform support. Matlab runs out of the box on every major platform. In research, when you want something to just work, spending days getting a python distribution configured with a mutually-compatible set of package versions is just ridiculous. Caveat: I haven't tried anaconda, which hopefully has solved this problem.
Very low housekeeping overhead. No other serious language (is BASIC a serious language?) lets you start writing code without having to include headers, define namespaces, allocate memory... For biologists without programming experience, this is a godsend.
Integrated debugging environment. Non-programmers will not easily be able to learn a language that does not come with an IDE. R, I'm looking at you. Python has very nice options now.
Intrinsic vectorisation of operations. for loops are kind of ugly and error-prone, when what you really want to do is perform an operation on every element of a matrix or perform matrix operations. I know that Python has some add-ins to accomplish matrix operations, but Python itself is not vectorised.
Support for object-oriented software design. As a legacy language, Matlab has a whole bunch of baggage. Mathworks is slowly improving the design of the language and adding other niceties (the parallel computing toolbox is pretty great): the class system; tables with named columns; the ability to ignore return and input arguments in function calls; function handles; namespaces...
Ability to work across machine abstraction levels. Matlab used to be slow, but the JIT compilation works wonders and keeps improving. You can operate at a very high level of abstraction with classes and objects; if you need something fast and low-level, you can write a small amount of C code and call it natively from Matlab.


Things Matlab does badly


Graphics and GUIDE. Oh my god. Handle graphics is pretty horrible. I know they are working on version 2, and it can't come soon enough. matplotlib in Python looks much better, and R makes amazing graphs out of the box. GUIs are pretty ugly to design in any language, but GUIDE makes it very easy to write some really horrible code.
Global namespace. This is sort-of true, and sort-of makes sense for convenience's sake. It's an inherent tradeoff between ease of use and nice encapsulation. Matlab does provide namespace support now, but I think it's still true that the vast majority of toolboxes don't use it.
First-class functions. If the anonymous function system could be upgraded slightly to handle multiple return arguments and to handle currying... Also, intrinsic support for named arguments and parameters would be greatly helpful, especially considering that many Matlab functions accept named parameters as part of their calling syntax.