Its most likely a Malaysian broadtail. One strain of this species will find a rock face and swim back and forth in an attempt to show off its tail colors and attract mates. If it does not find a mate within a few months, it's fins actually become rigid and enables the betta to climb out of the water and find a new area to display in so you will want to make sure the tank is tighly sealed. Now I must also warn you that I am completely joking right now and some fish do things just because they want to.