The word "for" isn't used exactly the same way in those sentences. The first means that the cathedral is a famous feature of the town but it doesn't necessarily mean that the town is famous only becase of the cathedral.
Paris is famous for the Eiffel Tower but that isn't the only reason Paris is well known.
In the second sentence on the other hand, "for" is closer to "because". I couldn't speak because my laughter made it difficult.