To start answering a question like this you need to first look at why we shoot video horizontally. Human vision is not a square, we see much wider than we see tall. Early TV was more or less square due to limitations of technology at the time (it's hard to make an electron beam go really far to one side without lots of extra cost or space.) Theater however didn't have this problem and so they stuck with something that more fits human vision to make the most use of our ability to see.
Portrait video doesn't make much use of the range of our vision, but it is used in portraiture because it more naturally captures the human form (though not normally in such a narrow 9 by 16 ratio.) Thus, some people end up naturally holding their phone to shoot video in portrait since it is both how they hold a phone and how they are used to seeing photos of individual people.
To an extent, this even makes sense for videos that will be played back on the small device where the screen size is a bigger limitation than the visible area of our vision. For a situation like a video conference for example, portrait video makes a lot more sense, but for anything that will be seen at a larger size, portrait doesn't make sense as it drastically limits the amount of visual field we can fill.
With that established, there are two things that could be done to help with not shooting portrait. One, you could use the accelerometer to detect vertical filming and simply prevent it (or give a warning), but this is a frustrating artificial limitation to put on users, particularly since there are some situations where it could be valid.
The second potential solution is to simply record a 16x9 image regardless of phone orientation when recording video. Most modern smart phones have sufficient resolution to expose a 1920 pixel wide image in either direction since a 1080p image is really only a 2MP or so image. The problem comes down to optimization. In general, image sensors take a while to read out data from the sensor. This is why, for example, a high end DSLR may be able to shoot 60p video but can't take more than 7 or 8 full resolution photos at a time.
To get around this readout speed problem for video (which needs 24 or more frames per second), only a portion of the sensor is actually read. This is often hooked up to special hardware that will only read the lines of the sensor that are needed for the video and skip the others. In sensors of this type, it would need additional hardware to skip the appropriate lines in both orientations and would increase the cost and complexity of the sensor.
Additionally, you then have a display problem. If you are shooting a 1080p video while the camera is vertical, no phone that I am aware of has sufficient resolution for a 1:1 display of the captured video horizontally across the screen. You could scale it down, but the aspect ratio of the phone would still make it use a very small portion of the screen when recording, making it hard to see what you are doing clearly.
So there are a lot of factors why a phone can't simply shoot horizontally regardless of orientation, ranging from the fact there are some good reasons to use the camera for video in a portrait orientation on occasion, the sensor itself may not support it and the user interface when doing so would be limiting.