upvote
In the US, NEC and most local codes (which are often based on some version of the NEC) require that connections be made inside a box. This is largely because connections are the most likely place for an electrical fire to start and the box helps contain it.
reply