Why is Gedit set as default calendar app in Ubuntu?

When there is no real calendar application on your system, it automatically switches to gedit.Because gedit can be configured to have some basic functionality of calendar with extra plugins.

And look here. A bug has been reported on this issue:

A bug on gedit in Launchpad


There's the ability for you to change it.

For example:

sudo apt-get install orage

From Synaptic:

a calendar for the Xfce4 desktop environment. It integrates itself nicely into the desktop environment, is highly configurable and supports alerts based on dates. If you are looking for a good graphical calendar, you will probably want to try out orage. It stores its data in iCal format.

You can find yourself lots of others with preview how do they look like just google it.

e.g. here or here

Alternatively,

You can launch Ubuntu Software Center and just type calendar in search field and pick one of your choice.

Edit

There's also a fix you can apply manually:

gedit /home/yourname/.local/share/applications/mimeapps.list

and paste this line text/calendar=thunderbird.desktop at the end of [default applications] save and close it. Now you can run:

gvfs-mime --query text/calendar

And you'll get e.g.:

Default application for 'text/calendar': thunderbird.desktop
Registered applications:
        thunderbird.desktop