Suppose that I am providing a SaaS on the web. What happens if someone (after working with my service and getting familiar with it), develops the software (and ideas used in it) and patents it?
If the PTO examiner does not find your website while doing their prior art search, your competitor might still be able to get the patent and even sue other companies with it. I'm assuming that if they are dishonest enough to steal your idea and apply for a patent for it, they will be very happy to sue companies left and right. It takes a few years for a patent to issue.
At that time if you get sued you will have the option of trying to invalidate his patent by claiming your website was prior art. However, it may be a tedious and costly process and since it will be in like 5 years you will have to prove your website was here before he applied for the patent. Also, if for some reason you are out of business in 5 years, a lot of companies will be unfairly sued. It's good to have dated public records detailing your invention.
My thoughts on this are that if you think your invention is patentable, you should try to patent it. If you want no one else to patent it, you can also file for the patent and then abandon the application once it's been published since that is the strongest and easiest to find prior art. The latter case acts like a defensive publication to prevent people from patenting the idea. Or you could try and get the patent yourself, then only use it as to counter-sue.
Anyway I'm not a lawyer so you'll probably get better advice from the actual practitioners on here.